Libraries

    library(nortest)  
    library(ggmap)
    library(ggplot2)
    library(tidyverse)
    library(plyr)
    library(reshape2)

    library(lme4)
    library(vegan)
    library(ggfortify)
    library(ggthemes)
    library(FactoMineR)
    library(ggrepel)
    library(PerformanceAnalytics)


# Plots
MyTheme<-theme_bw() +  
theme(legend.position="top",
          plot.background=element_blank(),
          axis.text.x = element_text(angle = 90, vjust = 0.5),
          panel.grid.major.y = element_blank(),
          panel.grid.major.x = element_blank(),
          panel.grid.minor.x = element_blank(),
          panel.grid.minor.y = element_blank(),
          legend.box.background = element_rect(),
          legend.title = element_blank(),
          panel.background =element_rect(fill = NA, 
                                         color = "black"))#+
  #guides(fill=guide_legend(nrow=2,byrow=TRUE), shape=guide_legend(nrow=3,byrow=TRUE))

# Season_fill<-scale_fill_manual(values =
#                            c("#2b83ba", "#abdda4",
#                              "#d7191c", "#fdae61"))
# 
# Season_colour<-scale_colour_manual(values =
#                            c("#2b83ba", "#abdda4",
#                              "#d7191c", "#fdae61"))
# 
Site_shapes13<- scale_shape_manual(values=c(0,3,2,1,16,5,6,7,4,15,8,17,18))
# Zone_shapes3<- scale_shape_manual(values=c(21,23,24))

Leer/explorar datos

Data

Time points, dates, time, and sample location

Data<-read.csv("Data/All_data.csv")

Data$TimePoint<-factor(Data$TimePoint, levels = c("4M", "5M", "6M", "7M"))
Data$Station<-as.factor(Data$Station)
Data$Site<-as.factor(Data$Site)
Data$Date<-as.Date(Data$Date)
row.names(Data)<-Data$Sample
# head(Data)
summary(Data)
##  TimePoint    Station      Sample               Lat             Lon       
##  4M:13     1      : 4   Length:51          Min.   :8.005   Min.   :76.51  
##  5M:12     2      : 4   Class :character   1st Qu.:8.021   1st Qu.:76.74  
##  6M:13     3      : 4   Mode  :character   Median :8.126   Median :76.85  
##  7M:13     4      : 4                      Mean   :8.284   Mean   :76.82  
##            5      : 4                      3rd Qu.:8.522   3rd Qu.:76.90  
##            7      : 4                      Max.   :8.882   Max.   :76.95  
##            (Other):27                                                     
##          Site         Date                Time             Meta_ID         
##  Candelaria: 4   Min.   :2015-12-02   Length:51          Length:51         
##  Currulao  : 4   1st Qu.:2016-01-11   Class :character   Class :character  
##  El Uno    : 4   Median :2016-04-25   Mode  :character   Mode  :character  
##  Leoncito  : 4   Mean   :2016-04-05                                        
##  Margarita : 4   3rd Qu.:2016-06-24                                        
##  Marirrio  : 4   Max.   :2016-08-28                                        
##  (Other)   :27                                                             
##  Transparency_m   Temperature_C    Salinity_psu           pH       
##  Min.   : 0.095   Min.   :27.39   Min.   : 0.1573   Min.   :7.435  
##  1st Qu.: 0.645   1st Qu.:28.19   1st Qu.: 6.5087   1st Qu.:8.033  
##  Median : 1.275   Median :28.78   Median :10.7620   Median :8.195  
##  Mean   : 2.362   Mean   :28.89   Mean   :14.1235   Mean   :8.162  
##  3rd Qu.: 2.965   3rd Qu.:29.55   3rd Qu.:23.8611   3rd Qu.:8.363  
##  Max.   :10.050   Max.   :30.61   Max.   :29.7127   Max.   :8.805  
##                                                                    
##     DO_mg.L        Chla_mg.m3       Seston_mg.L          Speed       
##  Min.   :2.710   Min.   : 0.0000   Min.   :  6.667   Min.   :0.0000  
##  1st Qu.:3.112   1st Qu.: 0.7983   1st Qu.: 11.150   1st Qu.:0.2729  
##  Median :3.360   Median : 2.2388   Median : 16.250   Median :0.5864  
##  Mean   :3.718   Mean   : 3.2988   Mean   : 30.325   Mean   :0.5754  
##  3rd Qu.:4.230   3rd Qu.: 4.1218   3rd Qu.: 27.414   3rd Qu.:0.7751  
##  Max.   :5.750   Max.   :21.7979   Max.   :191.000   Max.   :1.8159  
##                                                                      
##     Biomass           Biovolumen          Taxa_S        Shannon_H      
##  Min.   :0.006667   Min.   :  4.554   Min.   : 4.00   Min.   :0.03649  
##  1st Qu.:0.011475   1st Qu.: 12.413   1st Qu.: 8.00   1st Qu.:0.46165  
##  Median :0.016550   Median : 24.808   Median :11.00   Median :1.01400  
##  Mean   :0.029742   Mean   : 78.686   Mean   :11.29   Mean   :0.99827  
##  3rd Qu.:0.027414   3rd Qu.: 89.548   3rd Qu.:14.00   3rd Qu.:1.41050  
##  Max.   :0.191000   Max.   :523.588   Max.   :18.00   Max.   :2.15400  
##                                                                        
##  Equitability_J        Acaro            Bivalvo          Cangrejos      
##  Min.   :0.02632   Min.   :  0.000   Min.   :    0.0   Min.   :  0.000  
##  1st Qu.:0.23210   1st Qu.:  0.000   1st Qu.:    0.0   1st Qu.:  0.000  
##  Median :0.42480   Median :  0.000   Median :    0.0   Median :  0.000  
##  Mean   :0.40791   Mean   :  7.501   Mean   : 2080.0   Mean   :  7.511  
##  3rd Qu.:0.57365   3rd Qu.:  0.000   3rd Qu.:  405.8   3rd Qu.:  0.000  
##  Max.   :0.76010   Max.   :170.257   Max.   :53086.5   Max.   :383.078  
##                                                                         
##   Chaetognata           Copepoda          Cladocera        Euphasido    
##  Min.   :     0.00   Min.   :      83   Min.   :     0   Min.   :    0  
##  1st Qu.:     0.00   1st Qu.:   30055   1st Qu.:     0   1st Qu.:    0  
##  Median :    39.45   Median :  124980   Median :     0   Median :    0  
##  Mean   : 11696.04   Mean   :  584733   Mean   : 20184   Mean   : 2579  
##  3rd Qu.:  3565.00   3rd Qu.:  238307   3rd Qu.:  1641   3rd Qu.:  735  
##  Max.   :294204.03   Max.   :12943820   Max.   :378119   Max.   :60861  
##                                                                         
##   Gasteropodo        Hydromedusa     Huevos.redondos   Huevos.ovalados 
##  Min.   :     0.0   Min.   :     0   Min.   :    0.0   Min.   :   0.0  
##  1st Qu.:   282.3   1st Qu.:     0   1st Qu.:    0.0   1st Qu.:   0.0  
##  Median :  1144.1   Median :     0   Median :  116.3   Median :   0.0  
##  Mean   : 13913.3   Mean   : 17246   Mean   : 4973.3   Mean   :1086.4  
##  3rd Qu.:  6216.6   3rd Qu.:  2315   3rd Qu.: 1789.6   3rd Qu.: 433.2  
##  Max.   :138024.9   Max.   :333855   Max.   :92634.7   Max.   :9864.4  
##                                                                        
##     Insectos       Larvas.de.Peces   Larvas.Brachiura   Larvas.Camarón   
##  Min.   :   0.00   Min.   :    0.0   Min.   :     0.0   Min.   :    0.0  
##  1st Qu.:   0.00   1st Qu.:  183.1   1st Qu.:   276.4   1st Qu.:    0.0  
##  Median :   0.00   Median :  487.8   Median :   817.4   Median :  111.4  
##  Mean   : 173.12   Mean   : 1929.6   Mean   : 14442.4   Mean   : 1529.8  
##  3rd Qu.:  76.47   3rd Qu.: 1359.1   3rd Qu.:  5994.6   3rd Qu.: 1538.0  
##  Max.   :3912.36   Max.   :31298.9   Max.   :220273.4   Max.   :13504.2  
##                                                                          
##  Larvas.Insectos    Luciféridos        Myscidaceos         Oikopleura    
##  Min.   :   0.00   Min.   :     0.0   Min.   :     0.0   Min.   :     0  
##  1st Qu.:   0.00   1st Qu.:    25.5   1st Qu.:     0.0   1st Qu.:     0  
##  Median :   0.00   Median :  1202.3   Median :   613.3   Median :     0  
##  Mean   :  91.61   Mean   : 26043.3   Mean   : 13649.5   Mean   : 17862  
##  3rd Qu.:   0.00   3rd Qu.: 13708.7   3rd Qu.:  5443.8   3rd Qu.:  5396  
##  Max.   :3784.25   Max.   :802368.9   Max.   :291975.7   Max.   :422535  
##                                                                          
##    Ostracoda        Pez.juvenil       Polichaeto       Porcelanidos   
##  Min.   :    0.0   Min.   :  0.00   Min.   :   0.00   Min.   :   0.0  
##  1st Qu.:    0.0   1st Qu.:  0.00   1st Qu.:   0.00   1st Qu.:   0.0  
##  Median :    0.0   Median :  0.00   Median :   0.00   Median :   0.0  
##  Mean   :  567.7   Mean   : 13.91   Mean   : 381.39   Mean   : 117.3  
##  3rd Qu.:    0.0   3rd Qu.:  0.00   3rd Qu.:  19.19   3rd Qu.:   0.0  
##  Max.   :14921.6   Max.   :368.02   Max.   :5308.65   Max.   :1721.7  
##                                                                       
##    Pteropoda      Stomatopoda        Huevos.indeterminados  Diptera.pupa    
##  Min.   :    0   Min.   :     0.00   Min.   :    0.0       Min.   :  0.000  
##  1st Qu.:    0   1st Qu.:    95.97   1st Qu.:    0.0       1st Qu.:  0.000  
##  Median :    0   Median :  1717.35   Median :    0.0       Median :  0.000  
##  Mean   :  254   Mean   : 16719.64   Mean   :  476.1       Mean   :  4.277  
##  3rd Qu.:    0   3rd Qu.: 16648.06   3rd Qu.:    0.0       3rd Qu.:  0.000  
##  Max.   :10819   Max.   :176968.24   Max.   :12343.5       Max.   :218.111  
## 
Station<-Data %>% select(c("Station", "Site"))

Data exploration

Data from time points 4 to 7 are used, since the multiparameter was not calibrated in the previous time points.

    chart.Correlation(Data %>% select('Transparency_m':'Seston_mg.L'), method = "spearman")
## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

    #chart.Correlation(Data, method = "kendall")

    chart.Correlation(Data %>% select('Transparency_m':'Taxa_S'), method = "spearman")
## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

    #chart.Correlation(Data, method = "kendall")
    
    chart.Correlation(Data %>% select('Acaro':'Larvas.de.Peces'), method = "spearman")
## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

    #chart.Correlation(Data, method = "kendall")
    
    chart.Correlation(Data %>% select('Larvas.de.Peces':'Diptera.pupa'), method = "spearman")
## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties

    #chart.Correlation(Data, method = "kendall")

1 Physicochemical data and river-ocecean transition

1.1 correlations

head(Data)
  # 1. Visualizar variables
    plot(Data %>% select('Transparency_m':'Seston_mg.L'))

    chart.Correlation(Data[10:16])

  # Transparency_m, Temperature_C, salinidad y conductividad parecen relacionarse. 
  # Tal vez tambien pH y temperatuora


# 2. Son estas variables normales?
  Tem<-ggplot(Data, aes(x=Temperature_C)) +
    geom_histogram()+ MyTheme
  Tem 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

    #library(nortest) # Paquete que tiene varios test de normalidad cvm supuestamente sirve para muestras pequenas
    cvm.test(Data$Temperature_C) # P> 0.05 No se puede rechazar la Ho de que los datos son normales :)
## 
##  Cramer-von Mises normality test
## 
## data:  Data$Temperature_C
## W = 0.076161, p-value = 0.2273
    qqnorm(Data$Temperature_C)
    qqline(Data$Temperature_C)

  Sal<-ggplot(Data, aes(x=Salinity_psu))+
    geom_histogram()+ MyTheme
  Sal
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

    cvm.test(Data$Salinity_psu) # NO normal
## 
##  Cramer-von Mises normality test
## 
## data:  Data$Salinity_psu
## W = 0.30306, p-value = 0.0002841
    qqnorm(Data$Salinity_psu)
    qqline(Data$Salinity_psu)

  Trans<-ggplot(Data, aes(x=Transparency_m ))+
    geom_histogram()+ MyTheme
  Trans
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

    cvm.test(Data$Transparency_m) # NO normal
## 
##  Cramer-von Mises normality test
## 
## data:  Data$Transparency_m
## W = 0.70635, p-value = 5.135e-08
    qqnorm(Data$Transparency_m)
    qqline(Data$Transparency_m)

  pH<-ggplot(Data, aes(x=pH ))+
    geom_histogram()+ MyTheme
  pH
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

    cvm.test(Data$pH) # NO normal
## 
##  Cramer-von Mises normality test
## 
## data:  Data$pH
## W = 0.13792, p-value = 0.03307
    qqnorm(Data$pH)
    qqline(Data$pH)

Segundo, evaluar las correlaciones. * Recuerden que en teoria no se deben calcular correlaciones con datos que no son normales (Salinidad y Temperature_C)

# Temepratura vs Transparency_m (Salinidad en color)
Temperature<-ggplot(Data, aes(x=Transparency_m, y=Temperature_C, colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ 
      scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency (m)")+ ylab("Temperature (C)")+
      geom_text_repel(aes(x=Transparency_m, 
                          y=Temperature_C, label = Site), size=3)
Temperature

Temperature+facet_wrap(~TimePoint)

# Modelo
  Temperature.lm<-lm(data = Data, Temperature_C~Transparency_m)  
  summary(Temperature.lm)
## 
## Call:
## lm(formula = Temperature_C ~ Transparency_m, data = Data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4354 -0.6869 -0.1950  0.6467  1.5537 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    28.51762    0.15474 184.294  < 2e-16 ***
## Transparency_m  0.15573    0.04408   3.533 0.000908 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8174 on 49 degrees of freedom
## Multiple R-squared:  0.203,  Adjusted R-squared:  0.1867 
## F-statistic: 12.48 on 1 and 49 DF,  p-value: 0.000908
# Salinidad vs Transparency_m (Temperature en color)    
  Salinidad<-ggplot(Data, aes(x=Transparency_m, 
                    y=Salinity_psu, colour=Temperature_C)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ 
        xlab("Transparency (m)")+ ylab("Salinity (psu)")+
        geom_text_repel(aes(x=Transparency_m, y=Salinity_psu, 
                            label = Site), size=3)
  Salinidad
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

  Salinidad +facet_wrap(~TimePoint)  
## Warning: ggrepel: 2 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

  Salinidad<-ggplot(Data, aes(x=Transparency_m, 
                    y=Salinity_psu, colour=Temperature_C)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ 
        xlab("Transparency (m)")+ ylab("Salinity (psu)")+
        geom_text_repel(aes(x=Transparency_m, y=Salinity_psu, 
                            label = Site), size=3)
  Salinidad
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

  Salinidad +facet_wrap(~TimePoint)  
## Warning: ggrepel: 2 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

  # Modelo
  Salinidad.lm<-lm(data = Data, Salinity_psu~Transparency_m)  
    summary(Salinidad.lm)
## 
## Call:
## lm(formula = Salinity_psu ~ Transparency_m, data = Data)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -9.836 -5.351 -1.172  4.132 19.185 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      8.5064     1.3812   6.159 1.33e-07 ***
## Transparency_m   2.3779     0.3935   6.043 2.01e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.296 on 49 degrees of freedom
## Multiple R-squared:  0.427,  Adjusted R-squared:  0.4153 
## F-statistic: 36.52 on 1 and 49 DF,  p-value: 2.009e-07
  # Recuerden que salinidad no es normal

          
# Temperetura vs Salinidad (Transparencia en color) 
    Salinidad2<-ggplot(Data, aes(x=Temperature_C, y=Salinity_psu, colour=Transparency_m)) + 
        #geom_smooth(method=lm, colour="gray", se=FALSE)+
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Temperature (C)")+ ylab("Salinity (psu)")+
        geom_text_repel(aes(x=Temperature_C, y=Salinity_psu, label = Site), size=3)
  Salinidad2

  Salinidad2 +facet_wrap(~TimePoint) 
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

  Salinidad2.lm<-lm(data = Data, Salinity_psu~Temperature_C)  
  summary(Salinidad2.lm)
## 
## Call:
## lm(formula = Salinity_psu ~ Temperature_C, data = Data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -13.7027  -6.3585  -0.9322   6.9330  17.7539 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   -131.124     38.184  -3.434 0.001219 ** 
## Temperature_C    5.028      1.321   3.806 0.000393 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.468 on 49 degrees of freedom
## Multiple R-squared:  0.2281, Adjusted R-squared:  0.2124 
## F-statistic: 14.48 on 1 and 49 DF,  p-value: 0.0003934
  # Yo no consideraria este, pues las dos variables NO son normales. 
      
  
# pH vs Transparency_m (Salinidad en color)    
    pH_1<-ggplot(Data, aes(x=Transparency_m, y=pH, colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Tranparency (m)")+ ylab("pH")+
      geom_text_repel(aes(x=Transparency_m, y=pH, label = Site), size=3)
    pH_1

    pH_1 +facet_wrap(~TimePoint) 

  # Modelo
    pH_1.lm<-lm(data = Data, pH~Transparency_m)  
    summary(pH_1.lm)
## 
## Call:
## lm(formula = pH ~ Transparency_m, data = Data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.60770 -0.14068  0.05923  0.15038  0.59761 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     8.03461    0.04307 186.545  < 2e-16 ***
## Transparency_m  0.05391    0.01227   4.394 5.96e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2275 on 49 degrees of freedom
## Multiple R-squared:  0.2826, Adjusted R-squared:  0.268 
## F-statistic:  19.3 on 1 and 49 DF,  p-value: 5.963e-05
# pH vs Temperature (Salinidad en color)       
    pH_2<-ggplot(Data, aes(x=Temperature_C, y=pH, colour=Salinity_psu)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Temperature (m)")+ ylab("pH")+
        geom_text_repel(aes(x=Temperature_C, y=pH, label = Site), size=3)
    pH_2 +facet_wrap(~TimePoint) 

    pH_3<-ggplot(Data, aes(x=Temperature_C, y=pH, colour=Seston_mg.L )) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Temperature (m)")+ ylab("pH")+
        geom_text_repel(aes(x=Temperature_C, y=pH, label = Site), size=3)
    pH_3 +facet_wrap(~TimePoint) 

    # Modelo
    pH_2.lm<-lm(data = Data, pH~Temperature_C)  
    summary(pH_2.lm)
## 
## Call:
## lm(formula = pH ~ Temperature_C, data = Data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.53287 -0.18341  0.04029  0.17521  0.43052 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    4.11538    1.06423   3.867 0.000325 ***
## Temperature_C  0.14009    0.03683   3.804 0.000395 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.236 on 49 degrees of freedom
## Multiple R-squared:  0.228,  Adjusted R-squared:  0.2122 
## F-statistic: 14.47 on 1 and 49 DF,  p-value: 0.0003953
  # Chla vs Oxigeno (Tranparecia en color)       
    Chla<-ggplot(Data, aes(x=(Chla_mg.m3), y=DO_mg.L, colour=Transparency_m)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Chlorophyll-a")+ ylab("Dissolved Oxygen")+
        geom_text_repel(aes(x=(Chla_mg.m3), y=DO_mg.L, label = Site), size=3)
    Chla

    Chla + facet_wrap(~TimePoint)
## Warning: ggrepel: 2 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    # Modelo
    Oxigeno.lm<-lm(data = Data, DO_mg.L~Chla_mg.m3)  
    summary(Oxigeno.lm)
## 
## Call:
## lm(formula = DO_mg.L ~ Chla_mg.m3, data = Data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1014 -0.6483 -0.3260  0.5924  1.9286 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.82141    0.16220  23.560   <2e-16 ***
## Chla_mg.m3  -0.03128    0.03060  -1.022    0.312    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9067 on 49 degrees of freedom
## Multiple R-squared:  0.02087,    Adjusted R-squared:  0.0008918 
## F-statistic: 1.045 on 1 and 49 DF,  p-value: 0.3118
  # Chla vs Tranparecia (Oxigeno en color)       
    Chla_2<-ggplot(Data, aes(x=Transparency_m, y=Chla_mg.m3, colour=DO_mg.L)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Transparency (m)")+ ylab("Clorofila a")+
        geom_text_repel(aes(x=Transparency_m, y=Chla_mg.m3, label = Site), size=3)
    Chla_2
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Chla_2 + facet_wrap(~TimePoint)

    # Modelo
    Chla.lm<-lm(data = Data, Chla_mg.m3~Transparency_m)  
      summary(Chla.lm)
## 
## Call:
## lm(formula = Chla_mg.m3 ~ Transparency_m, data = Data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.0210 -2.1736 -1.3153  0.6629 17.5930 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      4.2642     0.7747   5.504 1.34e-06 ***
## Transparency_m  -0.4087     0.2207  -1.852   0.0701 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.092 on 49 degrees of freedom
## Multiple R-squared:  0.0654, Adjusted R-squared:  0.04632 
## F-statistic: 3.429 on 1 and 49 DF,  p-value: 0.0701
     # Recuerden que Temperature_C no es normal
      
    # Chla vs Transparency (Seston en color)       
    Chla_Tranparencia<-ggplot(Data, aes(x=Transparency_m, y=Chla_mg.m3, colour=Seston_mg.L)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Transparency (m)")+ ylab("Clorofila a")+
        geom_text_repel(aes(x=Transparency_m, y=Chla_mg.m3, label = Site), size=3)
    Chla_Tranparencia
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Chla_Tranparencia + facet_wrap(~TimePoint)

    # Chla vs Seston_mg.L (Transparency en color)       
    Chla_Seston<-ggplot(Data, aes(x=Seston_mg.L, y=Chla_mg.m3, colour=Transparency_m)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Seston_mg.L")+ ylab("Clorofila a")+
        geom_text_repel(aes(x=Seston_mg.L, y=Chla_mg.m3, label = Site), size=3)
    Chla_Seston 
## Warning: ggrepel: 17 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Chla_Seston + facet_wrap(~TimePoint)
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider increasing max.overlaps
## ggrepel: 1 unlabeled data points (too many overlaps). Consider increasing max.overlaps
## Warning: ggrepel: 4 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    # Modelo
      Chla.lm<-lm(data = Data, Chla_mg.m3~Transparency_m)  
      summary(Chla.lm)
## 
## Call:
## lm(formula = Chla_mg.m3 ~ Transparency_m, data = Data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.0210 -2.1736 -1.3153  0.6629 17.5930 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      4.2642     0.7747   5.504 1.34e-06 ***
## Transparency_m  -0.4087     0.2207  -1.852   0.0701 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.092 on 49 degrees of freedom
## Multiple R-squared:  0.0654, Adjusted R-squared:  0.04632 
## F-statistic: 3.429 on 1 and 49 DF,  p-value: 0.0701
    # Salinidad vs BIOmasa 
    Seston<-ggplot(Data, aes(x=Salinity_psu, y=Seston_mg.L, colour=Temperature_C)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Salinity (psu)")+ ylab("Seston_mg.L")+
        geom_text_repel(aes(x=Salinity_psu, y=Seston_mg.L, label = Site), size=3)
    Seston + facet_wrap(~TimePoint)
## Warning: ggrepel: 3 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    # Modelo
    Seston.lm<-lm(data = Data, Seston_mg.L~Salinity_psu)  
    summary(Seston.lm)
## 
## Call:
## lm(formula = Seston_mg.L ~ Salinity_psu, data = Data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -40.914 -22.130   0.119   8.345 129.191 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   62.4024     7.8557   7.944 2.33e-10 ***
## Salinity_psu  -2.2712     0.4623  -4.913 1.04e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 31.19 on 49 degrees of freedom
## Multiple R-squared:   0.33,  Adjusted R-squared:  0.3163 
## F-statistic: 24.13 on 1 and 49 DF,  p-value: 1.043e-05
    # Transparecia vs Seston_mg.L 
    Seston2<-ggplot(Data, aes(x=Transparency_m, y=Seston_mg.L, colour=Salinity_psu)) + 
        scale_colour_gradient(low="blue", high = "red")+
        geom_point()+ MyTheme+ xlab("Transparency (m)")+ ylab("Seston_mg.L")+
        geom_text_repel(aes(x=Transparency_m, y=Seston_mg.L, label = Site), size=3)
    Seston2
## Warning: ggrepel: 12 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Seston + facet_wrap(~TimePoint)
## Warning: ggrepel: 3 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

Pueden correr mas variables fisicas si quieren, pero lo mejor para mostrar la correlacion entre las variables fcoquimicas (usandolas todas al mismo timpo es el PCA)

1.2 PCA of physicochimical data

Data_PCA<-Data %>% select(-c('Station':'Lon'))
Data_PCA<-Data_PCA %>% select(-c('Date':'Meta_ID'))
Data_PCA<-Data_PCA %>% select(c('TimePoint':'Seston_mg.L'))
    
Data.pca <- rda(Data_PCA[, (3:9)], scale=TRUE)
Data.pca2 <- prcomp(Data_PCA[, (3:9)], scale=TRUE)
summary(Data.pca)
## 
## Call:
## rda(X = Data_PCA[, (3:9)], scale = TRUE) 
## 
## Partitioning of correlations:
##               Inertia Proportion
## Total               7          1
## Unconstrained       7          1
## 
## Eigenvalues, and their contribution to the correlations 
## 
## Importance of components:
##                          PC1    PC2    PC3     PC4     PC5     PC6    PC7
## Eigenvalue            3.1651 1.3562 0.8511 0.59344 0.47114 0.39712 0.1659
## Proportion Explained  0.4522 0.1937 0.1216 0.08478 0.06731 0.05673 0.0237
## Cumulative Proportion 0.4522 0.6459 0.7675 0.85227 0.91957 0.97630 1.0000
## 
## Scaling 2 for species and site scores
## * Species are scaled proportional to eigenvalues
## * Sites are unscaled: weighted dispersion equal on all dimensions
## * General scaling constant of scores:  4.325308 
## 
## 
## Species scores
## 
##                     PC1      PC2     PC3      PC4      PC5       PC6
## Transparency_m  1.28117 -0.04575 0.12608  0.54870 -0.82621  0.010475
## Temperature_C   1.11959 -0.77865 0.43462 -0.09305  0.36949  0.671515
## Salinity_psu    1.44115  0.50383 0.07725  0.15435  0.09817  0.132440
## pH              1.32672  0.14265 0.32417  0.17074  0.52394 -0.668230
## DO_mg.L        -0.02617 -1.51462 0.29544 -0.21441 -0.21235 -0.376489
## Chla_mg.m3     -0.66139  0.58756 1.34339 -0.22830 -0.18108  0.005344
## Seston_mg.L    -1.13537 -0.32059 0.25833  1.06077  0.27928  0.066823
## 
## 
## Site scores (weighted sums of species scores)
## 
##            PC1      PC2      PC3      PC4      PC5       PC6
## 4M1  -1.076830 -1.01587  0.53168  2.22219  0.84200 -0.855697
## 4M2  -0.358397 -1.20344 -0.19297 -0.75319 -0.34556  0.039110
## 4M3  -0.295485 -1.01365 -0.10290 -0.78322 -0.42033 -0.186251
## 4M4  -0.940537 -0.74587 -0.35471  0.47337 -0.37950  0.120977
## 4M5  -0.004642 -0.76561  0.34968 -0.72771 -0.62068 -0.041287
## 4M7  -0.102872 -1.22635  0.03881 -0.40230  0.41377 -0.546132
## 4M8  -0.341022 -0.95192  0.06621 -0.40043  0.14537  0.415916
## 4M9  -0.169264 -1.27068 -0.28084 -0.82796 -0.21110 -0.460255
## 4M10  0.486840 -1.13058  0.30952 -0.43656  0.64804 -0.222779
## 4M12  0.779011 -0.79483  0.17998  0.16561  0.04504  0.021013
## 4M13  0.733636 -0.75046  0.18401  0.05949 -0.18264 -0.447766
## 4M14  1.094638 -0.71861  0.21708  0.69710 -1.26141  0.099898
## 4M15  0.840154 -0.47988  0.50067  0.50331 -1.51235 -0.113629
## 5M1   0.126326  0.71263 -0.82402  0.03633  0.07820 -0.341584
## 5M2  -0.191983  0.42064 -0.83612 -0.22382  0.18111 -0.493608
## 5M3  -0.256547  0.23594 -0.78792 -0.11752  0.30501 -0.061759
## 5M4  -0.358857  0.38433 -0.15775 -0.47236 -0.11269 -0.137730
## 5M5  -0.191345  0.31667 -0.81889 -0.16316 -0.09993 -0.539714
## 5M7  -0.198516  0.19072 -0.59689  0.40087  0.69381 -1.409937
## 5M8  -0.377251  0.26367 -0.40683  0.05297  0.18446 -0.800225
## 5M9  -0.203897  0.38814 -0.10181 -0.34475 -0.02507 -1.120788
## 5M10  0.384583  0.42285 -0.54895 -0.03383  0.33219 -0.208362
## 5M12  0.325662  0.63874 -0.31096 -0.12009  0.32882 -0.140859
## 5M13  0.321391  0.68800 -0.44873 -0.08555  0.59046 -0.466831
## 5M15  0.068519  1.04851  1.33127 -0.48893  0.23949 -0.209179
## 6M1  -1.315602  0.83628  2.26810  0.32624 -0.47572 -0.500012
## 6M2  -0.223366  0.17081 -0.19892 -0.64931 -0.24065  0.486100
## 6M3  -0.403859  0.08002 -0.22508 -0.76769 -0.33343  0.904511
## 6M4  -1.142759  0.11138 -0.58831  0.82340 -0.25337  0.864617
## 6M5  -0.329357  0.56470 -0.22292 -0.40391 -0.23104 -0.747158
## 6M7  -0.485883  0.55123  0.92757 -0.75314 -0.17742 -0.113511
## 6M8  -1.052181  0.43474 -0.40989 -0.42913 -1.04856  0.857337
## 6M9  -0.178995  0.44291  0.76444 -0.59949 -0.03393 -0.570643
## 6M10  0.351774  0.38309 -0.43319  0.08813 -0.01852 -0.148028
## 6M12  0.571103  0.44312 -0.27806  0.30558 -0.16572  0.353877
## 6M13  0.494029  0.45744 -0.50951  0.33359 -0.17189 -0.275996
## 6M14  0.934032  0.45167  0.15386  0.92658 -1.36664 -0.094269
## 6M15  0.731613  0.52224  0.23708  0.79255 -1.52599 -0.523068
## 7M1  -1.003386  0.36135 -0.83630  0.19796 -0.56291  0.896333
## 7M2   0.308080 -0.08602  0.07206 -0.13603  0.26586  1.006411
## 7M3  -0.054616 -0.04630  0.24127 -0.27370  0.60029 -0.461106
## 7M4  -1.125772 -0.33021 -0.10947  1.80962  0.54853  0.731758
## 7M5   0.121441 -0.20153 -0.01168 -0.42201  0.70470  0.774865
## 7M7   0.369486  0.40951 -0.13464  0.10321  0.39038  1.540387
## 7M8  -0.251418  0.22418  1.69701 -0.36498  0.53556  0.900095
## 7M9  -0.016945  0.10507 -0.11962 -0.35887  0.08937  0.000496
## 7M10  0.656361 -0.08157  0.45574  0.12218  0.65790  0.761013
## 7M12  0.920577  0.11020  0.46046  0.27012  1.43681 -0.132371
## 7M13  0.478078  0.20678 -0.08751  0.07209  0.77915  0.273543
## 7M14  0.797560  0.20868  0.08272  0.40906  0.50859  0.669462
## 7M15  0.756691  0.02715 -0.13384  0.34803  0.23213  0.652816
# Checking if the PC axes are meaningful
eigenval <- Data.pca$CA$eig   # Here you will get the eigenvalues
sitecoord <- Data.pca$CA$u[,1:2]   # The site coordinates along PC1 and PC2
  eig <- data.frame(eigenval)
  eig$nb <- c(1:length(eigenval))
  eig$prop <- eig$eigenval/sum(eig$eigenval)
  eig
# (Kaiser-Guttman)
par(mfrow=c(1,2))
  barplot(eig$eigenval, main="Eigenvalues",las=2)
  abline(h=mean(eig$eigenval),col="red")    # average eigenvalue
  legend("topright","Average eigenvalue",lwd=1,col=2,bty="n")
  
  barplot(100*eig$prop,main="% of variance",las=2)

par(mfrow=c(1,1))

autoplot(Data.pca2, data = Data_PCA, colour="TimePoint", 
         shape="Site",
         loadings = TRUE, loadings.colour = 'black',
         loadings.label = TRUE, loadings.label.size = 3,
         loadings.label.vjust = -1.0,
         loadings.label.colour="black",
         frame = TRUE, frame.type = 'norm')+
MyTheme + Site_shapes13 # + facet_wrap(~TimePoint)

2. Biological data

Riqueza, H, Densidad, Biomasa…

Riqueza<-Data[,c("Sample", "Site","TimePoint", "Taxa_S", "Shannon_H", "Equitability_J")]

Riqueza.data <- melt(Riqueza, id.vars = c("Sample", "Site","TimePoint"))
Riqueza.data$Site<-factor(Riqueza.data$Site, 
                              levels=c("El Uno", "Roto",  "Leoncito",
                                       "Currulao", "Candelaria", "Yarumal", 
                                       "Marirrio",  "Margarita", 
                                       "RioNecocli","P.Arenas N", "P.Arenas S",
                                       "Bajo Medio", "Sabanilla"
                                        ))


  Riqueza_grafica<-ggplot(Riqueza.data, aes(x=Site, y=value), fill=="white") + 
      MyTheme+geom_bar(stat="identity", aes(fill=Site))+
      theme(legend.position="right", legend.box = "vertical")
  Riqueza_grafica + facet_wrap(~variable, ncol=1, scales = "free_y")

  Riqueza_grafica + facet_grid(~variable~TimePoint,  scales = "free_y") + MyTheme

  Riqueza_grafica2<-ggplot(Riqueza.data, aes(x=TimePoint, y=value), fill=="white") + 
      theme_bw()+geom_bar(stat="identity", aes(fill=TimePoint))+
      theme(legend.position="right", legend.box = "vertical")
  #Riqueza_grafica2 + facet_wrap(~variable, ncol=1, scales = "free_y")
  Riqueza_grafica2 + facet_grid(~variable~Site,  scales = "free_y") + MyTheme

Densidad por taxa

Abundancias<-Data %>% select('Acaro':'Diptera.pupa')
Abundancias$Sample<-Data$Sample
Abundancias$Site<-Data$Site
Abundancias$TimePoint<-Data$TimePoint

Abundancia.data <- melt(Abundancias, id.vars = c("Sample", "Site", "TimePoint"))
colnames(Abundancia.data)<-c("Sample", "Site", "TimePoint", "Taxon", "Densidad")
Abundancia.data$Densidad<-(Abundancia.data$Densidad/1000)
Abundancia.data$Site<-factor(Abundancia.data$Site, 
                              levels=c("El Uno", "Roto",  "Leoncito",
                                       "Currulao", "Candelaria", "Yarumal", 
                                       "Marirrio",  "Margarita", 
                                       "RioNecocli","P.Arenas N", "P.Arenas S",
                                       "Bajo Medio", "Sabanilla"
                                        ))

Densidad - muestreo

  Densidad<-ggplot(Abundancia.data, aes(x=Taxon, y=Densidad, fill=TimePoint)) + 
      MyTheme + geom_bar(stat="identity")+
      xlab("Taxa")+ ylab("Densidad (#/m3)")+ scale_y_continuous(trans='sqrt')+ 
      facet_wrap(~Site)
  Densidad

  Densidad<-ggplot(Abundancia.data, aes(x=Taxon, y=(log10(1+Densidad)), 
                                      fill=TimePoint)) + 
      MyTheme + geom_bar(stat="identity")+
      theme(legend.position="right", legend.box = "vertical",
            #axis.text.x = element_blank(), 
            axis.title.x = element_blank())+
      xlab("Taxa")+ ylab("Densidad de organismos(log10 (#/m3 + 1))")+
      facet_wrap(~Site, ncol=3)
  Densidad

Densidad - muestreo

  Densidad<-ggplot(Abundancia.data, aes(x=Site, y=Densidad, fill=Taxon)) + 
      MyTheme + geom_bar(stat="identity")+
      xlab("Taxa")+ ylab("Densidad (#/m3)")+ scale_y_continuous(trans='sqrt')+ 
      facet_wrap(~TimePoint)
  Densidad

  Densidad<-ggplot(Abundancia.data, aes(x=Site, y=(log10(1+Densidad)), 
                                      fill=Taxon)) + 
      MyTheme + geom_bar(stat="identity")+
      theme(legend.position="bottom", legend.box = "vertical",
            #axis.text.x = element_blank(), 
            axis.title.x = element_blank())+
      xlab("Taxa")+ ylab("Densidad de organismos(log10 (#/m3 + 1))")+
      facet_wrap(~TimePoint, ncol=4)
  Densidad

Explorar relacion entre fcoqcos y biologicos

Huevos redondos

    Hu.re_1<-ggplot(Data, aes(x=Chla_mg.m3, y=Huevos.redondos, colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Clorofila")+ ylab("Huevos Redondos")+
      geom_text_repel(aes(x=Chla_mg.m3, y=Huevos.redondos, label = Site), size=3)
    Hu.re_1
## Warning: ggrepel: 38 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Hu.re_1+ facet_wrap(~TimePoint)
## Warning: ggrepel: 11 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 9 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 10 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Hu.re_2<-ggplot(Data, aes(x=Salinity_psu, y=Huevos.redondos,
                              colour=Transparency_m)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinity (psu)")+ ylab("Huevos Redondos")+
      geom_text_repel(aes(x=Salinity_psu, y=Huevos.redondos, label = Site), size=3)
    Hu.re_2
## Warning: ggrepel: 30 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Hu.re_2 + facet_wrap(~TimePoint)
## Warning: ggrepel: 2 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 7 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Hu.re_3<-ggplot(Data, aes(x=Transparency_m, y=Huevos.redondos,
                              colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency_m")+ ylab("Huevos Redondos")+
      geom_text_repel(aes(x=Transparency_m, y=Huevos.redondos, label = Site), size=3)
    Hu.re_3
## Warning: ggrepel: 34 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Hu.re_3  + facet_wrap(~TimePoint)
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 12 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 4 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

Huevos ovalados

    Hu.ov_1<-ggplot(Data, aes(x=Chla_mg.m3, y=Huevos.ovalados, colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Clorofila")+ ylab("Huevos Ovalados")+
      geom_text_repel(aes(x=Chla_mg.m3, y=Huevos.ovalados, label = Site), size=3)
    Hu.ov_1
## Warning: ggrepel: 32 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Hu.ov_1+facet_wrap(~TimePoint)
## Warning: ggrepel: 8 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 8 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 4 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Hu.ov_2<-ggplot(Data, aes(x=Salinity_psu, y=Huevos.ovalados,
                              colour=Transparency_m)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinity psu")+ ylab("Huevos Ovalados")+
      geom_text_repel(aes(x=Salinity_psu, y=Huevos.ovalados, label = Site), size=3)
    Hu.ov_2  + facet_wrap(~TimePoint)
## Warning: ggrepel: 2 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 7 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    # Esta me parece que tiene futuro... 
    
    Hu.ov_3<-ggplot(Data, aes(x=Transparency_m, y=Huevos.ovalados,
                              colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency_m")+ ylab("Huevos Ovalados")+
      geom_text_repel(aes(x=Transparency_m, y=Huevos.ovalados, label = Site), size=3)
    Hu.ov_3  + facet_wrap(~TimePoint)
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 10 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 2 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    # Esta me parece tambien puede tener futuro... 

Organismos

    Org_1<-ggplot(Data, aes(x=Chla_mg.m3, y=Seston_mg.L , colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Clorofila")+ ylab("Organismos")+
      geom_text_repel(aes(x=Chla_mg.m3, y=Seston_mg.L , label = Site), size=3)
    Org_1  + facet_wrap(~TimePoint)
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 5 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 9 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Org_2<-ggplot(Data, aes(x=Salinity_psu, y=Seston_mg.L , colour=Transparency_m)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinity_psu")+ ylab("Organismos")+
      geom_text_repel(aes(x=Salinity_psu, y=Seston_mg.L , label = Site), size=3)
    Org_2  + facet_wrap(~TimePoint)
## Warning: ggrepel: 3 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Org_3<-ggplot(Data, aes(x=Transparency_m, y=Seston_mg.L , colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency_m")+ ylab("Organismos")+
      geom_text_repel(aes(x=Transparency_m, y=Seston_mg.L,
                          label = Site), size=3)
    Org_3  + facet_wrap(~TimePoint)
## Warning: ggrepel: 8 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 4 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

Biomasa volumetrica

    Vol_1<-ggplot(Data, aes(x=Chla_mg.m3, y= Biovolumen , colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Clorofila")+ ylab("Biovolumen")+
      geom_text_repel(aes(x=Chla_mg.m3, y= Biovolumen , label = Site), size=3)
    Vol_1
## Warning: ggrepel: 24 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Vol_1 + facet_wrap(~TimePoint)
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 2 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    BioVol_Sal<-ggplot(Data, aes(x=Salinity_psu, y= Biovolumen , colour=Chla_mg.m3)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinity_psu (psu)")+ ylab("Biovolumen")+
      geom_text_repel(aes(x=Salinity_psu, y= Biovolumen , label = Site), size=3)
    BioVol_Sal + facet_wrap(~TimePoint)

    Vol_2<-ggplot(Data, aes(x=Salinity_psu, y= Biovolumen , colour=Transparency_m)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinity_psu")+ ylab("Biomasa")+
      geom_text_repel(aes(x=Salinity_psu, y= Biovolumen , label = Site), size=3)
    Vol_2 + facet_wrap(~TimePoint)

    Vol_3<-ggplot(Data, aes(x=Transparency_m, y= Biovolumen , colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency_m")+ ylab("Biomasa")+
      geom_text_repel(aes(x=Transparency_m, y= Biovolumen , label = Site), size=3)
    Vol_3 + facet_wrap(~TimePoint)
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

Seston

    Seston_1<-ggplot(Data, aes(x=Chla_mg.m3, y=Seston_mg.L, colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Clorofila")+ ylab("Seston")+
      geom_text_repel(aes(x=Chla_mg.m3, y=Seston_mg.L, label = Site), size=3)
    Seston_1
## Warning: ggrepel: 27 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Seston_1+ facet_wrap(~TimePoint)
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 5 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 9 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Seston_2<-ggplot(Data, aes(x=Salinity_psu, y=Seston_mg.L, colour=Transparency_m)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinity_psu")+ ylab("Seston")+
      geom_text_repel(aes(x=Salinity_psu, y=Seston_mg.L, label = Site), size=3)
    Seston_2 + facet_wrap(~TimePoint)
## Warning: ggrepel: 3 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Seston_3<-ggplot(Data, aes(x=Transparency_m, y=Seston_mg.L,
                               colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency_m")+ ylab("Seston")+
      geom_text_repel(aes(x=Transparency_m, y=Seston_mg.L, label = Site), size=3)
    Seston_3 + facet_wrap(~TimePoint)
## Warning: ggrepel: 8 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps
## Warning: ggrepel: 4 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

     Chl_3<-ggplot(Data, aes(x=Transparency_m, y=Chla_mg.m3 , colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency_m")+ ylab("Clorophila a")+
      geom_text_repel(aes(x=Transparency_m, y=Chla_mg.m3, label = Site), size=3)
    Chl_3
## Warning: ggrepel: 1 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

    Chl_3 + facet_wrap(~TimePoint)

Riqueza

    S_1<-ggplot(Data, aes(x=Chla_mg.m3, y=Taxa_S , colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Clorofila")+ ylab("Riqueza")+
      geom_text_repel(aes(x=Chla_mg.m3, y=Taxa_S , label = Site), size=3)
    S_1

    S_1 + facet_wrap(~TimePoint)

    # S_1b<-ggplot(Data, aes(x=Salinity_psu, y=Taxa_S , colour=Chla_mg.m3)) + 
    #   #geom_smooth(method=lm, colour="gray")+
    #   geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
    #   xlab("Salinidad (psu)")+ ylab("Riqueza")+
    #   geom_text_repel(aes(x=Salinity_psu, y=Taxa_S , label = Site), size=3)
    # S_1b
    # S_1 + facet_wrap(~TimePoint)
  
    S_2<-ggplot(Data, aes(x=Salinity_psu, y=Taxa_S , colour=Transparency_m)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinidad (psu)")+ ylab("Riqueza")+
      geom_text_repel(aes(x=Salinity_psu, y=Taxa_S , label = Site), size=3)
    S_2 + facet_wrap(~TimePoint)

    S_2b<-ggplot(Data, aes(x=Salinity_psu, y=Taxa_S , colour=Transparency_m)) + 
      geom_smooth(method=lm, colour="gray", se=F)+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinidad (psu)")+ ylab("Riqueza")+
      geom_text_repel(aes(x=Salinity_psu, y=Taxa_S , label = Site), size=3)
    S_2b + facet_wrap(~TimePoint)
## `geom_smooth()` using formula 'y ~ x'

    # Modelo
    Riqueza_2.lm<-lm(data = Data, Taxa_S~Salinity_psu)  
    summary(Riqueza_2.lm)
## 
## Call:
## lm(formula = Taxa_S ~ Salinity_psu, data = Data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.2528 -1.6579  0.5733  1.5897  4.9652 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   7.27423    0.65736  11.066 6.28e-15 ***
## Salinity_psu  0.28462    0.03869   7.357 1.86e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.61 on 49 degrees of freedom
## Multiple R-squared:  0.5249, Adjusted R-squared:  0.5152 
## F-statistic: 54.13 on 1 and 49 DF,  p-value: 1.859e-09
    # ESTE VALE LA PENA
      
    S_3<-ggplot(Data, aes(x=Transparency_m, y=Taxa_S , colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Transparency_m")+ ylab("Riqueza")+
      geom_text_repel(aes(x=Transparency_m, y=Taxa_S , label = Site), size=3)
    S_3 + facet_wrap(~TimePoint)

    Riqueza_3.lm<-lm(data = Data, Taxa_S~Transparency_m)  
      summary(Riqueza_3.lm)
## 
## Call:
## lm(formula = Taxa_S ~ Transparency_m, data = Data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -6.2005 -2.2938 -0.2326  2.7983  6.1645 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      9.7766     0.6404  15.266  < 2e-16 ***
## Transparency_m   0.6424     0.1824   3.521  0.00094 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.383 on 49 degrees of freedom
## Multiple R-squared:  0.2019, Adjusted R-squared:  0.1856 
## F-statistic:  12.4 on 1 and 49 DF,  p-value: 0.0009403

Diversidad

  H_1<-ggplot(Data, aes(x=Chla_mg.m3, y=Shannon_H, colour=Salinity_psu)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Clorofila")+ ylab("Diversidad (H)")+
      geom_text_repel(aes(x=Chla_mg.m3, y=Shannon_H, label = Site), size=3)
    H_1

    H_1+ facet_wrap(~TimePoint)

    H_1b<-ggplot(Data, aes(x=Salinity_psu, y=Shannon_H , colour=Chla_mg.m3)) + 
      #geom_smooth(method=lm, colour="gray")+
      geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
      xlab("Salinidad (psu)")+ ylab("Diversidad")+
      geom_text_repel(aes(x=Salinity_psu, y=Shannon_H , label = Site), size=3)
    H_1b

    H_1b + facet_wrap(~TimePoint)

que era Densidad ???

    # Densidad_1<-ggplot(Data, aes(x=Chla_mg.m3, y=Densidad , colour=Salinity_psu)) + 
    #   #geom_smooth(method=lm, colour="gray")+
    #   geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
    #   xlab("Clorofila")+ ylab("Densidad")+
    #   geom_text_repel(aes(x=Chla_mg.m3, y=Densidad , label = Site), size=3)
    # Densidad_1
    # Densidad_1 + facet_wrap(~TimePoint)
    
    # tiff('Densidad_Chla_2.tiff', units="in", width=5, height=4, res=300)
    # Densidad_1 + xlim(0,0.005)
    # dev.off()
    # 
    # Densidad_2<-ggplot(Data, aes(x=Salinity_psu, y=Densidad , colour=Chla_mg.m3)) + 
    #   #geom_smooth(method=lm, colour="gray")+
    #   geom_point()+ MyTheme+ scale_colour_gradient(low="blue", high = "red")+
    #   xlab("Salinidad (psu)")+ ylab("Densidad")+
    #   geom_text_repel(aes(x=Salinity_psu, y=Densidad , label = Site), size=3)
    # Densidad_2 + facet_wrap(~TimePoint)
    # 
    # tiff('Densidad_Salinidad.tiff', units="in", width=5, height=4, res=300)
    # Densidad_2
    # dev.off()

PCA con datos biologicos

  • Hay muchos datos, decidir se se usan todos los grupos
#library(vegan) 

# 1.Select only abundance data 
Abundancias2<-Abundancias
str(Abundancias2)
## 'data.frame':    51 obs. of  30 variables:
##  $ Acaro                : num  170.3 45.5 0 54.5 0 ...
##  $ Bivalvo              : num  0 0 0 0 0 ...
##  $ Cangrejos            : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Chaetognata          : num  0 0 0 0 33510 ...
##  $ Copepoda             : num  83937 29280 133463 30481 121007 ...
##  $ Cladocera            : num  681 19262 1181 709 0 ...
##  $ Euphasido            : num  4937 0 8858 22411 0 ...
##  $ Gasteropodo          : num  0 911 13583 0 7447 ...
##  $ Hydromedusa          : num  0 0 0 0 20478 ...
##  $ Huevos.redondos      : num  0 0 0 0 116 ...
##  $ Huevos.ovalados      : num  0 0 0 0 0 ...
##  $ Insectos             : num  170.3 227.7 0 54.5 0 ...
##  $ Larvas.de.Peces      : num  426 6694 31299 872 15533 ...
##  $ Larvas.Brachiura     : num  0 364 220273 382 94944 ...
##  $ Larvas.Camarón       : num  0 45.5 7086.5 0 3723.3 ...
##  $ Larvas.Insectos      : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Luciféridos          : num  0 0 39567 709 802369 ...
##  $ Myscidaceos          : num  0 0 36614 491 96806 ...
##  $ Oikopleura           : num  0 0 0 0 0 ...
##  $ Ostracoda            : num  3235 0 0 0 0 ...
##  $ Pez.juvenil          : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Polichaeto           : num  0 0 0 0 0 ...
##  $ Porcelanidos         : num  0 0 0 0 0 ...
##  $ Pteropoda            : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Stomatopoda          : num  0 0 18897 327 100529 ...
##  $ Huevos.indeterminados: num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Diptera.pupa         : num  0 0 0 218 0 ...
##  $ Sample               : chr  "4M1" "4M2" "4M3" "4M4" ...
##  $ Site                 : Factor w/ 13 levels "Bajo Medio","Candelaria",..: 11 2 6 5 7 3 4 13 10 9 ...
##  $ TimePoint            : Factor w/ 4 levels "4M","5M","6M",..: 1 1 1 1 1 1 1 1 1 1 ...
row.names(Abundancias2)<-Abundancias2$Sample
bio2<-Abundancias2 %>% select(-c("Sample":"TimePoint"))
                             
# 1. Transformar los datos de abundancia (hay varias opciones)
? decostand
    bio.transf.1 = decostand(bio2,"total")    # relative abundance profiles
    bio.transf.2 = decostand(bio2,"norm")     # chord-transformation 
    bio.transf.3 = decostand(bio2,"chi.sq")   # chi-square transformation
    bio.transf.4 = decostand(bio2,"hel")      # Hellinger transformation
    # "The Hellinger distance is also a measure recommended for clustering or
    # ordination of species abundance data (Rao 1995)".
    bio.transf.5 = decostand(bio2,"pa")       # convert to presence/absence (0/1) 
    
    Bio1.pca <- rda(bio.transf.1, scale=TRUE)  # 'scale=TRUE' calls for a standardization
    Bio2.pca <- rda(bio.transf.2, scale=TRUE)  # 'scale=TRUE' calls for a standardization
    Bio3.pca <- rda(bio.transf.3, scale=TRUE)  # 'scale=TRUE' calls for a standardization
    Bio4.pca <- rda(bio.transf.4, scale=TRUE)  # 'scale=TRUE' calls for a standardization
    Bio5.pca <- rda(bio.transf.5, scale=TRUE)  # 'scale=TRUE' calls for a standardization
    
    # Pueden revisar los PCAs con cada transformacion. A mi me parece que #4 es la mejor para separar los sitios
    summary(Bio1.pca)
## 
## Call:
## rda(X = bio.transf.1, scale = TRUE) 
## 
## Partitioning of correlations:
##               Inertia Proportion
## Total              27          1
## Unconstrained      27          1
## 
## Eigenvalues, and their contribution to the correlations 
## 
## Importance of components:
##                         PC1     PC2     PC3     PC4     PC5    PC6     PC7
## Eigenvalue            3.725 2.58907 2.29786 2.15797 1.81000 1.7360 1.44892
## Proportion Explained  0.138 0.09589 0.08511 0.07992 0.06704 0.0643 0.05366
## Cumulative Proportion 0.138 0.23385 0.31896 0.39889 0.46592 0.5302 0.58388
##                           PC8     PC9    PC10    PC11    PC12    PC13    PC14
## Eigenvalue            1.40092 1.34170 1.16433 0.98638 0.94540 0.83000 0.75504
## Proportion Explained  0.05189 0.04969 0.04312 0.03653 0.03501 0.03074 0.02796
## Cumulative Proportion 0.63577 0.68546 0.72858 0.76512 0.80013 0.83087 0.85884
##                          PC15    PC16    PC17    PC18    PC19    PC20    PC21
## Eigenvalue            0.70691 0.55369 0.52934 0.48189 0.37492 0.33998 0.31500
## Proportion Explained  0.02618 0.02051 0.01961 0.01785 0.01389 0.01259 0.01167
## Cumulative Proportion 0.88502 0.90552 0.92513 0.94298 0.95686 0.96946 0.98112
##                           PC22     PC23     PC24     PC25     PC26
## Eigenvalue            0.199414 0.134127 0.083006 0.060833 0.032313
## Proportion Explained  0.007386 0.004968 0.003074 0.002253 0.001197
## Cumulative Proportion 0.988508 0.993476 0.996550 0.998803 1.000000
## 
## Scaling 2 for species and site scores
## * Species are scaled proportional to eigenvalues
## * Sites are unscaled: weighted dispersion equal on all dimensions
## * General scaling constant of scores:  6.061547 
## 
## 
## Species scores
## 
##                             PC1       PC2       PC3        PC4       PC5
## Acaro                 -0.377823  0.250156 -0.128305  0.2180336 -0.038233
## Bivalvo                0.321105 -0.111036  0.360234  0.0307207  0.141574
## Cangrejos              0.349753 -0.214214  0.523387  0.5258613  0.381232
## Chaetognata            0.626730 -0.315503  0.370275  0.5413594  0.344216
## Copepoda              -0.567052 -0.040946  0.383538 -0.4173598 -0.406665
## Cladocera             -0.284361  0.221652 -0.184916  0.5782361 -0.171864
## Euphasido             -0.450050  0.377432 -0.320584  0.8488221 -0.057241
## Gasteropodo            0.729960  0.020059  0.560539  0.3308249 -0.098372
## Hydromedusa            0.049702  0.016266  0.097250 -0.0726936  0.494089
## Huevos.redondos        0.612391  0.003271 -0.674951 -0.0400936 -0.055364
## Huevos.ovalados        0.333355 -0.119446  0.194927 -0.0004376 -0.691715
## Insectos               0.008929 -0.154568 -0.451801 -0.1640890 -0.081642
## Larvas.de.Peces       -0.317922  0.036288 -0.057742 -0.2048338  0.270896
## Larvas.Brachiura      -0.028067 -0.066806 -0.053588 -0.2049102  0.074796
## Larvas.Camarón         0.588799 -0.039413  0.202700 -0.0949015 -0.528696
## Larvas.Insectos       -0.274533  0.221089 -0.175676  0.6193031 -0.092307
## Luciféridos            0.439658 -0.387803 -0.640210 -0.0439502  0.008689
## Myscidaceos            0.493123 -0.486007 -0.489011  0.0401227  0.150649
## Oikopleura             0.435900 -0.192160  0.165505  0.2935276 -0.243432
## Ostracoda              0.520868  0.946383 -0.090451 -0.1789286  0.085331
## Pez.juvenil            0.016818 -0.166913  0.226817  0.0139464  0.278273
## Polichaeto             0.706008  0.733403  0.002029 -0.0956090 -0.012572
## Porcelanidos           0.544310 -0.438474 -0.622910  0.1131419  0.037236
## Pteropoda              0.586933  0.931084 -0.086275 -0.1742046  0.100296
## Stomatopoda           -0.034105  0.020299  0.053838 -0.2435730  0.584843
## Huevos.indeterminados  0.185059 -0.128978  0.070965  0.0430459 -0.590688
## Diptera.pupa          -0.291588  0.231305 -0.216179  0.4841210 -0.035383
##                              PC6
## Acaro                  0.2854207
## Bivalvo               -0.6673047
## Cangrejos              0.3871988
## Chaetognata            0.3987689
## Copepoda               0.6066198
## Cladocera             -0.2811747
## Euphasido             -0.1394629
## Gasteropodo           -0.0036053
## Hydromedusa           -0.5403846
## Huevos.redondos        0.0953366
## Huevos.ovalados       -0.3615121
## Insectos               0.1416232
## Larvas.de.Peces       -0.1464670
## Larvas.Brachiura      -0.0765993
## Larvas.Camarón        -0.2067702
## Larvas.Insectos       -0.2497093
## Luciféridos           -0.0639155
## Myscidaceos            0.0411154
## Oikopleura            -0.0005565
## Ostracoda              0.1817465
## Pez.juvenil            0.2262665
## Polichaeto             0.0271835
## Porcelanidos           0.2157604
## Pteropoda              0.1280080
## Stomatopoda           -0.4922368
## Huevos.indeterminados -0.2461140
## Diptera.pupa           0.1390456
## 
## 
## Site scores (weighted sums of species scores)
## 
##            PC1       PC2      PC3      PC4       PC5       PC6
## 4M1  -0.967890  0.735277 -0.14981  0.10682 -0.260753  1.304965
## 4M2  -0.925760  0.379210 -0.27989  0.16082  0.162623  0.004709
## 4M3   0.190997 -0.332839 -0.20531 -0.54553 -0.014151 -0.595411
## 4M4  -1.500210  1.190054 -1.11223  2.49078 -0.182044  0.715384
## 4M5   0.459471 -0.795121 -1.25424 -0.17273  0.527235 -0.427100
## 4M7  -0.603525  0.011602  0.27746 -0.54348 -0.132953  0.495520
## 4M8  -0.594797  0.006591  0.28154 -0.48700 -0.234080  0.628747
## 4M9  -0.633594  0.086286  0.24551 -0.39785 -0.307825  0.754121
## 4M10  1.008136 -0.304507  1.32051  0.82330  0.087503  0.263075
## 4M12  1.352302 -1.003379 -1.43298  0.27335 -0.189399  0.641432
## 4M13  1.799465 -1.102122  2.69280  2.70553  1.961421  1.992121
## 4M14 -0.519364  0.011249  0.31241 -0.40315 -0.308634  0.544084
## 4M15 -0.238449 -0.050461  0.45097 -0.43098 -1.134149  0.057551
## 5M1   0.786123 -0.029766  0.90368  0.17725 -0.856929 -0.104596
## 5M2  -0.085369 -0.116593  0.52061  0.06907  0.049263  0.280422
## 5M3   0.010987 -0.411732 -0.21385 -0.47018  0.353906 -0.144541
## 5M4  -0.557815 -0.002363  0.27564 -0.51323 -0.183320  0.502546
## 5M5  -0.447912  0.025980  0.26186 -0.37988 -0.232755  0.369049
## 5M7  -0.479989 -0.222009  0.61624 -0.50818  0.594245  0.601312
## 5M8   0.164000  0.809176  0.23131 -0.40078  0.521043 -0.414803
## 5M9  -0.182263  0.053101  0.05190 -0.23368  1.512758 -1.554201
## 5M10  1.364449 -1.634353 -1.54175  0.66024  0.943994  0.868413
## 5M12 -0.438254 -0.042368  0.19126 -0.44130  0.095567  0.343258
## 5M13 -0.006253 -0.545947  0.05249 -0.27704  0.731895  0.349677
## 5M15 -0.600366  0.175164  0.17815  0.35895 -0.348103  0.026890
## 6M1  -0.370999  0.645693  0.01482 -0.26129 -0.056956  0.427407
## 6M2  -0.394200  0.033600  0.10745 -0.52139  1.100396 -0.727323
## 6M3  -0.470715  0.003922 -0.05240 -0.87098  1.427050 -1.273428
## 6M4  -0.705916  0.149341  0.04353 -0.24010  0.065349  0.138219
## 6M5  -0.641309 -0.255754 -0.69484 -0.94932 -0.241394  0.801825
## 6M7  -0.528656 -0.033171  0.21797 -0.50392 -0.240227  0.571400
## 6M8  -0.587524  0.002337  0.27658 -0.49488 -0.222467  0.613623
## 6M9  -0.454427  0.049572  0.18961 -0.53300  0.814812 -0.497957
## 6M10  1.360460 -1.198720 -3.59616 -0.20395  0.265327  0.385382
## 6M12  3.026333  4.788042 -0.44623 -0.89699  0.518407  0.656551
## 6M13  0.345722 -0.270239  0.68493 -0.17985  1.895856 -3.102875
## 6M14  0.251645 -0.296566  0.31975 -0.12509  0.058990 -0.429062
## 6M15  0.746686 -0.022903  0.04861  0.87109 -0.597583 -0.227708
## 7M1  -1.263405  1.203117 -1.16293  3.41769 -0.347825 -1.495096
## 7M2  -0.018601 -0.252504  0.44161 -0.10973 -0.270911  0.364051
## 7M3  -0.181199  0.045699  0.25994  0.11486  0.934408 -0.749394
## 7M4  -0.725506  0.533132 -0.51654  1.37807 -0.200017 -0.787461
## 7M5  -0.361398 -0.038338  0.34478 -0.54959 -0.622367  0.471656
## 7M7   0.490499 -0.202212 -0.87324 -0.14473  0.009788  0.472934
## 7M8  -0.380810 -0.085298 -0.06004 -0.59997  0.276493 -0.080883
## 7M9  -0.332225 -0.196957  0.04853 -0.45683 -0.191058  0.468791
## 7M10  1.502442 -0.262031  0.71877  0.06901 -2.141754 -1.707899
## 7M12  0.989281 -0.606456  0.36768  0.25204 -2.909714 -1.323932
## 7M13 -0.026228 -0.285073  0.03261 -0.08622 -0.822200  0.065067
## 7M14 -0.513516  0.136550  0.09528  0.10586 -0.390211  0.014347
## 7M15  0.889449 -0.474914  0.51565 -0.10193 -1.268549 -0.550858
    summary(Bio4.pca)                 # By default scaling=2
## 
## Call:
## rda(X = bio.transf.4, scale = TRUE) 
## 
## Partitioning of correlations:
##               Inertia Proportion
## Total              27          1
## Unconstrained      27          1
## 
## Eigenvalues, and their contribution to the correlations 
## 
## Importance of components:
##                          PC1    PC2     PC3     PC4     PC5     PC6     PC7
## Eigenvalue            5.3894 2.3491 2.29256 2.19579 1.89438 1.53292 1.50042
## Proportion Explained  0.1996 0.0870 0.08491 0.08133 0.07016 0.05677 0.05557
## Cumulative Proportion 0.1996 0.2866 0.37152 0.45284 0.52301 0.57978 0.63535
##                          PC8     PC9    PC10    PC11    PC12    PC13    PC14
## Eigenvalue            1.3420 1.21263 0.98898 0.88339 0.80163 0.71480 0.57409
## Proportion Explained  0.0497 0.04491 0.03663 0.03272 0.02969 0.02647 0.02126
## Cumulative Proportion 0.6851 0.72997 0.76660 0.79932 0.82901 0.85548 0.87674
##                          PC15    PC16    PC17    PC18    PC19     PC20     PC21
## Eigenvalue            0.52901 0.47325 0.42238 0.40444 0.34109 0.265801 0.229612
## Proportion Explained  0.01959 0.01753 0.01564 0.01498 0.01263 0.009844 0.008504
## Cumulative Proportion 0.89634 0.91386 0.92951 0.94449 0.95712 0.966963 0.975467
##                           PC22     PC23     PC24     PC25     PC26      PC27
## Eigenvalue            0.215050 0.159161 0.116764 0.089340 0.056736 0.0253394
## Proportion Explained  0.007965 0.005895 0.004325 0.003309 0.002101 0.0009385
## Cumulative Proportion 0.983432 0.989327 0.993651 0.996960 0.999062 1.0000000
## 
## Scaling 2 for species and site scores
## * Species are scaled proportional to eigenvalues
## * Sites are unscaled: weighted dispersion equal on all dimensions
## * General scaling constant of scores:  6.061547 
## 
## 
## Species scores
## 
##                             PC1      PC2      PC3      PC4      PC5       PC6
## Acaro                  0.458944 -0.38528  0.04749 -0.02110  0.11640 -0.594979
## Bivalvo               -0.542575  0.30729 -0.30491 -0.26218  0.27002  0.015305
## Cangrejos             -0.340245  0.25889 -0.17164 -0.31658  0.44238 -0.263699
## Chaetognata           -0.888876  0.09212 -0.06118 -0.17055  0.35899 -0.168514
## Copepoda               0.449557  0.29977  0.17644 -0.55146 -0.58943 -0.095526
## Cladocera              0.261429 -0.51836  0.26492 -0.41590  0.31993  0.142023
## Euphasido              0.554082 -0.52050 -0.03101 -0.13752  0.65523 -0.231099
## Gasteropodo           -0.854735  0.16717 -0.23970 -0.43745  0.06814 -0.300387
## Hydromedusa           -0.197888  0.25892 -0.43525  0.30654  0.37148  0.424128
## Huevos.redondos       -0.786295 -0.52170  0.14435  0.31145 -0.07024  0.162143
## Huevos.ovalados       -0.558643 -0.05961  0.44284 -0.50400 -0.18278  0.059871
## Insectos               0.062212 -0.35967  0.45692  0.35317 -0.14221 -0.082414
## Larvas.de.Peces        0.509628  0.15070 -0.09578  0.20883 -0.11237 -0.533302
## Larvas.Brachiura       0.008559  0.24636 -0.13953  0.32947 -0.22085 -0.295844
## Larvas.Camarón        -0.716605  0.07734  0.18353 -0.14361 -0.42352 -0.376693
## Larvas.Insectos        0.213566 -0.23091 -0.01854 -0.26948  0.52177  0.429801
## Luciféridos           -0.691587 -0.04945  0.34693  0.59891  0.13252 -0.110356
## Myscidaceos           -0.691315  0.05698  0.27024  0.53416  0.13867 -0.102242
## Oikopleura            -0.751473  0.01235  0.21392 -0.43329  0.14575 -0.149788
## Ostracoda             -0.167351 -0.70667 -0.69414  0.01375 -0.35521 -0.067896
## Pez.juvenil           -0.123434  0.49672 -0.21306 -0.01975  0.23265 -0.206481
## Polichaeto            -0.692121 -0.38340 -0.48527 -0.27425 -0.13444 -0.008244
## Porcelanidos          -0.707101 -0.26841  0.40337  0.33645  0.10120  0.070329
## Pteropoda             -0.333262 -0.59625 -0.77448  0.05483 -0.33325 -0.008516
## Stomatopoda           -0.090896  0.36325 -0.40704  0.45496  0.12654 -0.146216
## Huevos.indeterminados -0.277800 -0.14613  0.46553 -0.23105 -0.13690 -0.005153
## Diptera.pupa           0.288307 -0.35529  0.08378  0.05461  0.40138 -0.653467
## 
## 
## Site scores (weighted sums of species scores)
## 
##           PC1       PC2       PC3      PC4      PC5       PC6
## 4M1   1.17838 -1.289432 -0.157966 -0.26795 -0.25764 -0.999340
## 4M2   1.04318 -0.658509  0.409821 -0.24109 -0.18332 -1.261174
## 4M3   0.01768  0.617858  0.006277  1.13769 -0.54416 -1.525139
## 4M4   1.48333 -1.827968  0.431051  0.28099  2.06510 -3.362059
## 4M5  -0.41005  0.453180  0.209142  1.83099  0.37624 -0.351330
## 4M7   0.66839  0.456528  0.031390 -0.24782 -0.79623  0.002527
## 4M8   0.79142  0.243195  0.060475 -0.30064 -0.55192  0.656903
## 4M9   0.73299  0.009065  0.186808 -0.28142 -0.65864 -0.267910
## 4M10 -1.01531  0.707305 -0.402881 -0.65375  0.38198 -0.480762
## 4M12 -1.49625 -0.620810  1.063744  0.31123  0.03887  0.115199
## 4M13 -1.75055  1.331962 -0.883087 -1.62881  2.27602 -1.356720
## 4M14  0.46462  0.146631  0.237557 -0.69976 -0.55423  0.602880
## 4M15  0.01529 -0.009006  0.461421 -1.05137 -0.80168  0.685449
## 5M1  -1.05619  0.308653 -0.091138 -1.20155 -0.27125 -0.448469
## 5M2  -0.14836  0.699020 -0.554249 -0.71971  0.78191  0.068754
## 5M3  -0.07994  0.928406 -0.033191  1.18043 -0.28880 -0.479202
## 5M4   0.59528  0.479224  0.020260 -0.18700 -0.76576 -0.017989
## 5M5   0.49625  0.312997 -0.119252 -0.10368 -0.53336 -0.198010
## 5M7   0.45247  1.376475 -0.688212  0.05989 -0.15521 -0.287122
## 5M8   0.02880  0.151852 -1.230981 -0.21708  0.25826  0.781719
## 5M9   0.34772  0.342670 -0.749489  1.08153  0.86839  1.745064
## 5M10 -1.38155 -0.204915  1.061815  1.58214  0.70821  0.121017
## 5M12  0.21883  0.306808 -0.183682  0.28009 -0.24031  0.617645
## 5M13 -0.32691  1.222034 -0.260275  0.63399  0.44921 -0.458854
## 5M15  0.27524  0.033207 -0.176119 -0.81466  0.53384  1.392298
## 6M1   0.76772 -0.885790 -0.617151 -0.28801 -0.46061  0.221976
## 6M2   0.49218  0.485436 -0.487807  0.60750  0.18152 -0.202741
## 6M3   0.39090  0.809335 -0.388487  1.21046 -0.32891 -1.064613
## 6M4   0.98755 -0.304907 -0.062946 -0.21625 -0.09508 -0.102449
## 6M5   0.87280 -0.198154  0.803794  0.47290 -1.09907 -0.221437
## 6M7   0.52763  0.292771  0.255021  0.09156 -0.70459  0.267209
## 6M8   0.75979  0.345745  0.013997 -0.19823 -0.64880  0.622227
## 6M9   0.61533  0.592919 -0.572462  0.29178  0.03680  0.141101
## 6M10 -0.99056 -1.502262  1.581791  2.93236  0.64680  1.159870
## 6M12 -1.76100 -3.102351 -3.968803  0.33870 -1.75278 -0.215616
## 6M13 -0.43023  1.100543 -1.331798  0.91832  1.52695  1.241899
## 6M14 -0.63787  0.394361 -0.206114 -0.46076  0.17577  0.358346
## 6M15 -0.78865 -0.915419  0.187390 -0.53442  0.18185 -0.017436
## 7M1   1.21349 -1.699287  0.155411 -0.94641  2.77278  1.718701
## 7M2  -0.46727  0.449186  0.359572 -0.62088 -0.14484  0.001720
## 7M3   0.13061  0.422839 -0.534421  0.03059  0.94596 -0.856354
## 7M4   0.95471 -1.037875  0.268370 -0.54788  1.08994  0.831446
## 7M5   0.39463  0.179551  0.453929 -0.23065 -0.96655  0.217255
## 7M7  -0.81265 -0.594573  0.196474  0.68130 -0.29475  0.282830
## 7M8   0.55569  0.501238 -0.253579  0.55712 -0.64372  0.007145
## 7M9   0.25032  0.365462  0.301795  0.26785 -0.55801  0.336129
## 7M10 -1.70157 -0.300864  0.765660 -1.12789 -0.35692 -0.291172
## 7M12 -1.40381 -0.636372  2.020057 -1.07818 -0.54888 -0.150497
## 7M13 -0.37453 -0.392077  1.262998 -0.48237 -0.45776  0.230937
## 7M14  0.43692 -0.174485  0.422807 -0.89794 -0.25504  0.640723
## 7M15 -1.12689  0.288601  0.725263 -0.53323 -0.37757 -0.452572
    # This means that by default, the correlation among the descriptors is conserved
    
    # For a scale that conserves the euclidian distance among objects you have:
    summary(Bio4.pca, scaling=1)       # Using scaling=1
## 
## Call:
## rda(X = bio.transf.4, scale = TRUE) 
## 
## Partitioning of correlations:
##               Inertia Proportion
## Total              27          1
## Unconstrained      27          1
## 
## Eigenvalues, and their contribution to the correlations 
## 
## Importance of components:
##                          PC1    PC2     PC3     PC4     PC5     PC6     PC7
## Eigenvalue            5.3894 2.3491 2.29256 2.19579 1.89438 1.53292 1.50042
## Proportion Explained  0.1996 0.0870 0.08491 0.08133 0.07016 0.05677 0.05557
## Cumulative Proportion 0.1996 0.2866 0.37152 0.45284 0.52301 0.57978 0.63535
##                          PC8     PC9    PC10    PC11    PC12    PC13    PC14
## Eigenvalue            1.3420 1.21263 0.98898 0.88339 0.80163 0.71480 0.57409
## Proportion Explained  0.0497 0.04491 0.03663 0.03272 0.02969 0.02647 0.02126
## Cumulative Proportion 0.6851 0.72997 0.76660 0.79932 0.82901 0.85548 0.87674
##                          PC15    PC16    PC17    PC18    PC19     PC20     PC21
## Eigenvalue            0.52901 0.47325 0.42238 0.40444 0.34109 0.265801 0.229612
## Proportion Explained  0.01959 0.01753 0.01564 0.01498 0.01263 0.009844 0.008504
## Cumulative Proportion 0.89634 0.91386 0.92951 0.94449 0.95712 0.966963 0.975467
##                           PC22     PC23     PC24     PC25     PC26      PC27
## Eigenvalue            0.215050 0.159161 0.116764 0.089340 0.056736 0.0253394
## Proportion Explained  0.007965 0.005895 0.004325 0.003309 0.002101 0.0009385
## Cumulative Proportion 0.983432 0.989327 0.993651 0.996960 0.999062 1.0000000
## 
## Scaling 1 for species and site scores
## * Sites are scaled proportional to eigenvalues
## * Species are unscaled: weighted dispersion equal on all dimensions
## * General scaling constant of scores:  6.061547 
## 
## 
## Species scores
## 
##                            PC1      PC2      PC3      PC4     PC5      PC6
## Acaro                  1.02724 -1.30620  0.16299 -0.07400  0.4394 -2.49703
## Bivalvo               -1.21443  1.04181 -1.04638 -0.91935  1.0194  0.06423
## Cangrejos             -0.76156  0.87770 -0.58904 -1.11013  1.6701 -1.10670
## Chaetognata           -1.98955  0.31230 -0.20994 -0.59804  1.3553 -0.70723
## Copepoda               1.00623  1.01629  0.60552 -1.93373 -2.2252 -0.40091
## Cladocera              0.58515 -1.75738  0.90914 -1.45841  1.2078  0.59605
## Euphasido              1.24019 -1.76464 -0.10643 -0.48224  2.4737 -0.96989
## Gasteropodo           -1.91313  0.56674 -0.82260 -1.53398  0.2573 -1.26067
## Hydromedusa           -0.44293  0.87781 -1.49370  1.07492  1.4024  1.77999
## Huevos.redondos       -1.75994 -1.76870  0.49537  1.09214 -0.2652  0.68049
## Huevos.ovalados       -1.25039 -0.20210  1.51975 -1.76731 -0.6900  0.25127
## Insectos               0.13925 -1.21937  1.56804  1.23843 -0.5369 -0.34588
## Larvas.de.Peces        1.14068  0.51092 -0.32871  0.73228 -0.4242 -2.23818
## Larvas.Brachiura       0.01916  0.83522 -0.47883  1.15532 -0.8338 -1.24161
## Larvas.Camarón        -1.60396  0.26220  0.62984 -0.50359 -1.5989 -1.58092
## Larvas.Insectos        0.47802 -0.78286 -0.06361 -0.94497  1.9698  1.80381
## Luciféridos           -1.54796 -0.16767  1.19058  2.10015  0.5003 -0.46314
## Myscidaceos           -1.54735  0.19316  0.92740  1.87310  0.5235 -0.42909
## Oikopleura            -1.68200  0.04188  0.73412 -1.51937  0.5502 -0.62864
## Ostracoda             -0.37458 -2.39580 -2.38213  0.04821 -1.3410 -0.28495
## Pez.juvenil           -0.27628  1.68401 -0.73118 -0.06927  0.8783 -0.86657
## Polichaeto            -1.54915 -1.29982 -1.66535 -0.96168 -0.5076 -0.03460
## Porcelanidos          -1.58268 -0.90997  1.38428  1.17981  0.3821  0.29516
## Pteropoda             -0.74593 -2.02146 -2.65784  0.19225 -1.2581 -0.03574
## Stomatopoda           -0.20345  1.23150 -1.39686  1.59538  0.4777 -0.61364
## Huevos.indeterminados -0.62179 -0.49541  1.59761 -0.81021 -0.5168 -0.02163
## Diptera.pupa           0.64531 -1.20454  0.28752  0.19151  1.5153 -2.74249
## 
## 
## Site scores (weighted sums of species scores)
## 
##            PC1       PC2       PC3       PC4       PC5        PC6
## 4M1   0.526467 -0.380333 -0.046030 -0.076413 -0.068244 -0.2381174
## 4M2   0.466064 -0.194235  0.119419 -0.068754 -0.048557 -0.3005058
## 4M3   0.007900  0.182244  0.001829  0.324443 -0.144138 -0.3634020
## 4M4   0.662712 -0.539180  0.125605  0.080132  0.547007 -0.8010935
## 4M5  -0.183199  0.133671  0.060943  0.522155  0.099660 -0.0837130
## 4M7   0.298617  0.134658  0.009147 -0.070672 -0.210906  0.0006020
## 4M8   0.353585  0.071733  0.017622 -0.085735 -0.146194  0.1565233
## 4M9   0.327479  0.002674  0.054435 -0.080253 -0.174462 -0.0638361
## 4M10 -0.453615  0.208628 -0.117397 -0.186434  0.101179 -0.1145535
## 4M12 -0.668485 -0.183115  0.309967  0.088754  0.010296  0.0274490
## 4M13 -0.782098  0.392877 -0.257325 -0.464497  0.602875 -0.3232719
## 4M14  0.207581  0.043250  0.069222 -0.199556 -0.146806  0.1436509
## 4M15  0.006833 -0.002656  0.134455 -0.299825 -0.212350  0.1633250
## 5M1  -0.471877  0.091041 -0.026557 -0.342653 -0.071850 -0.1068588
## 5M2  -0.066284  0.206184 -0.161504 -0.205244  0.207114  0.0163822
## 5M3  -0.035716  0.273844 -0.009672  0.336630 -0.076498 -0.1141818
## 5M4   0.265957  0.141353  0.005904 -0.053327 -0.202837 -0.0042862
## 5M5   0.221712  0.092322 -0.034749 -0.029568 -0.141277 -0.0471807
## 5M7   0.202152  0.406007 -0.200540  0.017079 -0.041112 -0.0684139
## 5M8   0.012866  0.044791 -0.358699 -0.061906  0.068408  0.1862638
## 5M9   0.155354  0.101074 -0.218396  0.308427  0.230020  0.4158046
## 5M10 -0.617238 -0.060442  0.309405  0.451189  0.187592  0.0288352
## 5M12  0.097770  0.090496 -0.053524  0.079875 -0.063653  0.1471690
## 5M13 -0.146055  0.360453 -0.075842  0.180800  0.118987 -0.1093333
## 5M15  0.122972  0.009795 -0.051320 -0.232321  0.141405  0.3317494
## 6M1   0.342997 -0.261274 -0.179833 -0.082133 -0.122008  0.0528912
## 6M2   0.219892  0.143185 -0.142143  0.173244  0.048081 -0.0483080
## 6M3   0.174642  0.238723 -0.113202  0.345194 -0.087123 -0.2536703
## 6M4   0.441210 -0.089936 -0.018342 -0.061670 -0.025186 -0.0244110
## 6M5   0.389943 -0.058448  0.234220  0.134860 -0.291122 -0.0527629
## 6M7   0.235733  0.086356  0.074311  0.026110 -0.186632  0.0636691
## 6M8   0.339453  0.101982  0.004079 -0.056530 -0.171854  0.1482610
## 6M9   0.274912  0.174888 -0.166811  0.083209  0.009747  0.0336208
## 6M10 -0.442554 -0.443109  0.460923  0.836240  0.171325  0.2763677
## 6M12 -0.786766 -0.915074 -1.156481  0.096590 -0.464280 -0.0513759
## 6M13 -0.192215  0.324618 -0.388076  0.261882  0.404460  0.2959131
## 6M14 -0.284983  0.116321 -0.060060 -0.131399  0.046557  0.0853848
## 6M15 -0.352347 -0.270013  0.054604 -0.152403  0.048168 -0.0041547
## 7M1   0.542157 -0.501224  0.045286 -0.269895  0.734459  0.4095230
## 7M2  -0.208764  0.132493  0.104777 -0.177061 -0.038366  0.0004099
## 7M3   0.058352  0.124721 -0.155727  0.008725  0.250567 -0.2040475
## 7M4   0.426537 -0.306133  0.078201 -0.156243  0.288706  0.1981125
## 7M5   0.176312  0.052961  0.132272 -0.065777 -0.256021  0.0517664
## 7M7  -0.363072 -0.175376  0.057251  0.194292 -0.078073  0.0673912
## 7M8   0.248268  0.147846 -0.073891  0.158876 -0.170509  0.0017024
## 7M9   0.111835  0.107797  0.087941  0.076384 -0.147805  0.0800910
## 7M10 -0.760219 -0.088743  0.223108 -0.321648 -0.094540 -0.0693788
## 7M12 -0.627184 -0.187705  0.588630 -0.307473 -0.145388 -0.0358596
## 7M13 -0.167330 -0.115648  0.368028 -0.137561 -0.121252  0.0550263
## 7M14  0.195206 -0.051466  0.123203 -0.256073 -0.067556  0.1526680
## 7M15 -0.503467  0.085126  0.211336 -0.152065 -0.100012 -0.1078364
    eigenval <- Bio4.pca$CA$eig   # Here you will get the eigenvalues
    sitecoord <- Bio4.pca$CA$u[,1:2]   # The site coordinates along PC1 and PC2
    
# Plotting the results of the PCA 
#####################################

    # With scaling 1:
    biplot(Bio4.pca, scaling=1,main="PCA - Scaling 1")

    # With scaling 2 by default
    biplot(Bio4.pca,main="PCA - Scaling 2")       # by default: scaling type 2

    # With scaling 3 by default
    biplot(Bio4.pca, scaling=3, main="PCA - Scaling 3")       # by default: scaling type 2

Bio4.pca1 <- rda(bio.transf.4, scale=TRUE)
Bio4.pca <- prcomp(bio.transf.4, scale=TRUE)
summary(Bio4.pca1)
## 
## Call:
## rda(X = bio.transf.4, scale = TRUE) 
## 
## Partitioning of correlations:
##               Inertia Proportion
## Total              27          1
## Unconstrained      27          1
## 
## Eigenvalues, and their contribution to the correlations 
## 
## Importance of components:
##                          PC1    PC2     PC3     PC4     PC5     PC6     PC7
## Eigenvalue            5.3894 2.3491 2.29256 2.19579 1.89438 1.53292 1.50042
## Proportion Explained  0.1996 0.0870 0.08491 0.08133 0.07016 0.05677 0.05557
## Cumulative Proportion 0.1996 0.2866 0.37152 0.45284 0.52301 0.57978 0.63535
##                          PC8     PC9    PC10    PC11    PC12    PC13    PC14
## Eigenvalue            1.3420 1.21263 0.98898 0.88339 0.80163 0.71480 0.57409
## Proportion Explained  0.0497 0.04491 0.03663 0.03272 0.02969 0.02647 0.02126
## Cumulative Proportion 0.6851 0.72997 0.76660 0.79932 0.82901 0.85548 0.87674
##                          PC15    PC16    PC17    PC18    PC19     PC20     PC21
## Eigenvalue            0.52901 0.47325 0.42238 0.40444 0.34109 0.265801 0.229612
## Proportion Explained  0.01959 0.01753 0.01564 0.01498 0.01263 0.009844 0.008504
## Cumulative Proportion 0.89634 0.91386 0.92951 0.94449 0.95712 0.966963 0.975467
##                           PC22     PC23     PC24     PC25     PC26      PC27
## Eigenvalue            0.215050 0.159161 0.116764 0.089340 0.056736 0.0253394
## Proportion Explained  0.007965 0.005895 0.004325 0.003309 0.002101 0.0009385
## Cumulative Proportion 0.983432 0.989327 0.993651 0.996960 0.999062 1.0000000
## 
## Scaling 2 for species and site scores
## * Species are scaled proportional to eigenvalues
## * Sites are unscaled: weighted dispersion equal on all dimensions
## * General scaling constant of scores:  6.061547 
## 
## 
## Species scores
## 
##                             PC1      PC2      PC3      PC4      PC5       PC6
## Acaro                  0.458944 -0.38528  0.04749 -0.02110  0.11640 -0.594979
## Bivalvo               -0.542575  0.30729 -0.30491 -0.26218  0.27002  0.015305
## Cangrejos             -0.340245  0.25889 -0.17164 -0.31658  0.44238 -0.263699
## Chaetognata           -0.888876  0.09212 -0.06118 -0.17055  0.35899 -0.168514
## Copepoda               0.449557  0.29977  0.17644 -0.55146 -0.58943 -0.095526
## Cladocera              0.261429 -0.51836  0.26492 -0.41590  0.31993  0.142023
## Euphasido              0.554082 -0.52050 -0.03101 -0.13752  0.65523 -0.231099
## Gasteropodo           -0.854735  0.16717 -0.23970 -0.43745  0.06814 -0.300387
## Hydromedusa           -0.197888  0.25892 -0.43525  0.30654  0.37148  0.424128
## Huevos.redondos       -0.786295 -0.52170  0.14435  0.31145 -0.07024  0.162143
## Huevos.ovalados       -0.558643 -0.05961  0.44284 -0.50400 -0.18278  0.059871
## Insectos               0.062212 -0.35967  0.45692  0.35317 -0.14221 -0.082414
## Larvas.de.Peces        0.509628  0.15070 -0.09578  0.20883 -0.11237 -0.533302
## Larvas.Brachiura       0.008559  0.24636 -0.13953  0.32947 -0.22085 -0.295844
## Larvas.Camarón        -0.716605  0.07734  0.18353 -0.14361 -0.42352 -0.376693
## Larvas.Insectos        0.213566 -0.23091 -0.01854 -0.26948  0.52177  0.429801
## Luciféridos           -0.691587 -0.04945  0.34693  0.59891  0.13252 -0.110356
## Myscidaceos           -0.691315  0.05698  0.27024  0.53416  0.13867 -0.102242
## Oikopleura            -0.751473  0.01235  0.21392 -0.43329  0.14575 -0.149788
## Ostracoda             -0.167351 -0.70667 -0.69414  0.01375 -0.35521 -0.067896
## Pez.juvenil           -0.123434  0.49672 -0.21306 -0.01975  0.23265 -0.206481
## Polichaeto            -0.692121 -0.38340 -0.48527 -0.27425 -0.13444 -0.008244
## Porcelanidos          -0.707101 -0.26841  0.40337  0.33645  0.10120  0.070329
## Pteropoda             -0.333262 -0.59625 -0.77448  0.05483 -0.33325 -0.008516
## Stomatopoda           -0.090896  0.36325 -0.40704  0.45496  0.12654 -0.146216
## Huevos.indeterminados -0.277800 -0.14613  0.46553 -0.23105 -0.13690 -0.005153
## Diptera.pupa           0.288307 -0.35529  0.08378  0.05461  0.40138 -0.653467
## 
## 
## Site scores (weighted sums of species scores)
## 
##           PC1       PC2       PC3      PC4      PC5       PC6
## 4M1   1.17838 -1.289432 -0.157966 -0.26795 -0.25764 -0.999340
## 4M2   1.04318 -0.658509  0.409821 -0.24109 -0.18332 -1.261174
## 4M3   0.01768  0.617858  0.006277  1.13769 -0.54416 -1.525139
## 4M4   1.48333 -1.827968  0.431051  0.28099  2.06510 -3.362059
## 4M5  -0.41005  0.453180  0.209142  1.83099  0.37624 -0.351330
## 4M7   0.66839  0.456528  0.031390 -0.24782 -0.79623  0.002527
## 4M8   0.79142  0.243195  0.060475 -0.30064 -0.55192  0.656903
## 4M9   0.73299  0.009065  0.186808 -0.28142 -0.65864 -0.267910
## 4M10 -1.01531  0.707305 -0.402881 -0.65375  0.38198 -0.480762
## 4M12 -1.49625 -0.620810  1.063744  0.31123  0.03887  0.115199
## 4M13 -1.75055  1.331962 -0.883087 -1.62881  2.27602 -1.356720
## 4M14  0.46462  0.146631  0.237557 -0.69976 -0.55423  0.602880
## 4M15  0.01529 -0.009006  0.461421 -1.05137 -0.80168  0.685449
## 5M1  -1.05619  0.308653 -0.091138 -1.20155 -0.27125 -0.448469
## 5M2  -0.14836  0.699020 -0.554249 -0.71971  0.78191  0.068754
## 5M3  -0.07994  0.928406 -0.033191  1.18043 -0.28880 -0.479202
## 5M4   0.59528  0.479224  0.020260 -0.18700 -0.76576 -0.017989
## 5M5   0.49625  0.312997 -0.119252 -0.10368 -0.53336 -0.198010
## 5M7   0.45247  1.376475 -0.688212  0.05989 -0.15521 -0.287122
## 5M8   0.02880  0.151852 -1.230981 -0.21708  0.25826  0.781719
## 5M9   0.34772  0.342670 -0.749489  1.08153  0.86839  1.745064
## 5M10 -1.38155 -0.204915  1.061815  1.58214  0.70821  0.121017
## 5M12  0.21883  0.306808 -0.183682  0.28009 -0.24031  0.617645
## 5M13 -0.32691  1.222034 -0.260275  0.63399  0.44921 -0.458854
## 5M15  0.27524  0.033207 -0.176119 -0.81466  0.53384  1.392298
## 6M1   0.76772 -0.885790 -0.617151 -0.28801 -0.46061  0.221976
## 6M2   0.49218  0.485436 -0.487807  0.60750  0.18152 -0.202741
## 6M3   0.39090  0.809335 -0.388487  1.21046 -0.32891 -1.064613
## 6M4   0.98755 -0.304907 -0.062946 -0.21625 -0.09508 -0.102449
## 6M5   0.87280 -0.198154  0.803794  0.47290 -1.09907 -0.221437
## 6M7   0.52763  0.292771  0.255021  0.09156 -0.70459  0.267209
## 6M8   0.75979  0.345745  0.013997 -0.19823 -0.64880  0.622227
## 6M9   0.61533  0.592919 -0.572462  0.29178  0.03680  0.141101
## 6M10 -0.99056 -1.502262  1.581791  2.93236  0.64680  1.159870
## 6M12 -1.76100 -3.102351 -3.968803  0.33870 -1.75278 -0.215616
## 6M13 -0.43023  1.100543 -1.331798  0.91832  1.52695  1.241899
## 6M14 -0.63787  0.394361 -0.206114 -0.46076  0.17577  0.358346
## 6M15 -0.78865 -0.915419  0.187390 -0.53442  0.18185 -0.017436
## 7M1   1.21349 -1.699287  0.155411 -0.94641  2.77278  1.718701
## 7M2  -0.46727  0.449186  0.359572 -0.62088 -0.14484  0.001720
## 7M3   0.13061  0.422839 -0.534421  0.03059  0.94596 -0.856354
## 7M4   0.95471 -1.037875  0.268370 -0.54788  1.08994  0.831446
## 7M5   0.39463  0.179551  0.453929 -0.23065 -0.96655  0.217255
## 7M7  -0.81265 -0.594573  0.196474  0.68130 -0.29475  0.282830
## 7M8   0.55569  0.501238 -0.253579  0.55712 -0.64372  0.007145
## 7M9   0.25032  0.365462  0.301795  0.26785 -0.55801  0.336129
## 7M10 -1.70157 -0.300864  0.765660 -1.12789 -0.35692 -0.291172
## 7M12 -1.40381 -0.636372  2.020057 -1.07818 -0.54888 -0.150497
## 7M13 -0.37453 -0.392077  1.262998 -0.48237 -0.45776  0.230937
## 7M14  0.43692 -0.174485  0.422807 -0.89794 -0.25504  0.640723
## 7M15 -1.12689  0.288601  0.725263 -0.53323 -0.37757 -0.452572
# Checking if the PC axes are meaningful
eigenval <- Bio4.pca1$CA$eig   # Here you will get the eigenvalues
sitecoord <- Bio4.pca1$CA$u[,1:2]   # The site coordinates along PC1 and PC2
  eig <- data.frame(eigenval)
  eig$nb <- c(1:length(eigenval))
  eig$prop <- eig$eigenval/sum(eig$eigenval)
  eig
# (Kaiser-Guttman)
par(mfrow=c(1,2))
  barplot(eig$eigenval, main="Eigenvalues",las=2)
  abline(h=mean(eig$eigenval),col="red")    # average eigenvalue
  legend("topright","Average eigenvalue",lwd=1,col=2,bty="n")
  
  barplot(100*eig$prop,main="% of variance",las=2)

par(mfrow=c(1,1))

autoplot(Bio4.pca, data = Abundancias2, colour="Site", 
         shape="Site",
         loadings = TRUE, loadings.colour = 'black',
         loadings.label = TRUE, loadings.label.size = 3,
         loadings.label.vjust = -1.0,
         loadings.label.colour="black",
         frame = TRUE, frame.type = 'norm')+
MyTheme + Site_shapes13 
## Too few points to calculate an ellipse

autoplot(Bio4.pca, data = Abundancias2, colour="TimePoint", 
         shape="Site",
         loadings = TRUE, loadings.colour = 'black',
         loadings.label = TRUE, loadings.label.size = 3,
         loadings.label.vjust = -1.0,
         loadings.label.colour="black",
         frame = TRUE, frame.type = 'norm')+
MyTheme + Site_shapes13 

Podemos intentar graficar los parametros Datas con los biologicos. * Para eso hay correr el PCA con otro paquete * Este PCA puede verse super bacano, pero necesita que removamos algunas de las variables

# #library(FactoMineR)
#     
# str(Bio)
# ExtraBio<-Bio[, 24:28]
# str(Data.mean)
# str(Coordinates)
# str(bio.transf.4)
# 
# Bio.data<-cbind(bio.transf.4, ExtraBio, Data.mean)
# str(Bio.data)
# 
# biologico.PCA <- PCA(Bio.data, quanti.sup =21:34)
#     
#     # Results
#     biologico.PCA
# 
#     # You could then look at the eigenvalues, coordinates of sites and descriptors, ...
#     biologico.PCA$eig
#     biologico.PCA$ind$coord
#     biologico.PCA$var$coord
#     
    
# Note that the supplementary/additional descriptors are now in blue in the plot

# An other one is that it can handle missing data (see PCA help/documentation)

Clasificacion con datos biologicos

  • Use bio2 Data (Solo datos de abundancia)
head(bio.transf.4, n=2)
d <- dist(bio.transf.4, method="euclidian")
              # methods:
                #   euclidean
                #   maximum
                #   manhattan
                #   canberra
                #   binary
                #   minkowski

tW <- hclust(d, method="ward.D")
            # method:
              #     ward.D: synoptic, best after a CA, applicable here
              #     ward.D2: 
              #     single: descriptive
              #     complete: synoptic but less compact than ward
              #     average
              #     mcquitty
              #     median
              #     centroid

plot(tW, hang=-1)
# -> very compact groups <- effect of Ward's method. To be read only at the level of large groups
# cut three large groups
rect.hclust(tW, k=3)

# get the cluster numbers
clusters <- cutree(tW, k=3)

tS <- hclust(d, method="single")
plot(tS, hang=-1)
rect.hclust(tS, k=3)

# -> the change of aggregation method changed the structure of the tree. But this tree is not meant to look at general tendencies. It is meant to examine precise links between objects

# METODO COMPLETO
  #tiff('Cluster_Bco.tiff', units="in", width=7, height=6, res=200)
  tC <- hclust(d, method="complete")
  plot(tC, hang=-1, xlab = "", ylab = "", main = "")

  plot(tC,  xlab = "", ylab = "", main = "")
  rect.hclust(tC, k=3)

  #dev.off()

Mapas

# Atrato 

Golfo <- c(left = -77.5, bottom = 7.6, right = -76.3, top = 9)
  GolfoMap<-get_stamenmap(Golfo, zoom = 10, maptype = "toner-lite")
## ℹ Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.
  GolfoMap2<-ggmap(GolfoMap)
  
  # library(ggrepel)
  AtratoPublication<-GolfoMap2 + geom_point(data=Data, 
                                           aes(x=Lon, y=Lat), alpha=0.8, size=2) +
    geom_text_repel(data=Data, aes(x=Lon, y=Lat, label = Site), size=3)
  AtratoPublication
## Warning: Removed 51 rows containing missing values (geom_point).
## Warning: Removed 51 rows containing missing values (geom_text_repel).

# Colombia
Colombia <- c(left = -79.3, bottom = -0, right = -66.8, top = 13)
  ColombiaMap<-get_stamenmap(Colombia, zoom = 5, maptype = "toner-lite")
## ℹ Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.
  ColombiaMap2<-ggmap(ColombiaMap)
  ColombiaMap2

# Golfo con variables
  
Riqueza_map <- GolfoMap2 + geom_point(data=Data, aes(x=Data$Lon, y=Data$Lat, 
                            colour=Biovolumen, size=Taxa_S))+
    scale_colour_gradient(low="blue", high = "red")+
    geom_text_repel(data=Data, aes(x=Lon, y=Lat, label = Site), size=3)
 Riqueza_map
## Warning: Use of `Data$Lon` is discouraged. Use `Lon` instead.
## Warning: Use of `Data$Lat` is discouraged. Use `Lat` instead.
## Warning: Removed 51 rows containing missing values (geom_point).
## Warning: Removed 51 rows containing missing values (geom_text_repel).

 Densidad_map<-GolfoMap2 + geom_point(data=Data, aes(x=Data$Lon, y=Data$Lat, 
                            colour=Taxa_S, size=Biovolumen))+
    scale_colour_gradient(low="blue", high = "red")+
    geom_text_repel(data=Data, aes(x=Lon, y=Lat, label = Site), size=3)
Densidad_map
## Warning: Use of `Data$Lon` is discouraged. Use `Lon` instead.
## Warning: Use of `Data$Lat` is discouraged. Use `Lat` instead.
## Warning: Removed 51 rows containing missing values (geom_point).
## Warning: Removed 51 rows containing missing values (geom_text_repel).

# Copepoda_map1<-GolfoMap2 + geom_point(data=Data, aes(x=Data$lon, y=Data$lat, 
#                             colour=Copepoda/1000, size=Densidad))+
#     scale_colour_gradient(low="blue", high = "red")+
#     geom_text_repel(data=Data, aes(x=lon, y=lat, label = Site), size=3)
#     
# Copepoda_map2<-GolfoMap2 + geom_point(data=Data, aes(x=Data$lon, y=Data$lat, 
#                             colour=Densidad, size=Copepoda/1000))+
#     scale_colour_gradient(low="blue", high = "red")+
#     geom_text_repel(data=Data, aes(x=lon, y=lat, label = Site), size=3)
# 
# Copepoda_map3<-GolfoMap2 + geom_point(data=Data, aes(x=Data$lon, y=Data$lat, 
#                             colour=Taxa_S, size=Copepoda/1000))+
#     scale_colour_gradient(low="blue", high = "red")+
#     geom_text_repel(data=Data, aes(x=lon, y=lat, label = Site), size=3)

Packages used

# Creates bibliography 
#knitr::write_bib(c(.packages()), "packages.bib")
Arnold, Jeffrey B. 2021. Ggthemes: Extra Themes, Scales and Geoms for Ggplot2. https://github.com/jrnold/ggthemes.
Bates, Douglas, Martin Mächler, Ben Bolker, and Steve Walker. 2015. “Fitting Linear Mixed-Effects Models Using lme4.” Journal of Statistical Software 67 (1): 1–48. https://doi.org/10.18637/jss.v067.i01.
Bates, Douglas, Martin Maechler, Ben Bolker, and Steven Walker. 2022. Lme4: Linear Mixed-Effects Models Using Eigen and S4. https://github.com/lme4/lme4/.
Bates, Douglas, Martin Maechler, and Mikael Jagan. 2022. Matrix: Sparse and Dense Matrix Classes and Methods. https://CRAN.R-project.org/package=Matrix.
Gross, Juergen, and Uwe Ligges. 2015. Nortest: Tests for Normality. https://CRAN.R-project.org/package=nortest.
Henry, Lionel, and Hadley Wickham. 2020. Purrr: Functional Programming Tools. https://CRAN.R-project.org/package=purrr.
Horikoshi, Masaaki, and Yuan Tang. 2018. Ggfortify: Data Visualization Tools for Statistical Analysis Results. https://CRAN.R-project.org/package=ggfortify.
———. 2022. Ggfortify: Data Visualization Tools for Statistical Analysis Results. https://github.com/sinhrks/ggfortify.
Husson, Francois, Julie Josse, Sebastien Le, and Jeremy Mazet. 2023. FactoMineR: Multivariate Exploratory Data Analysis and Data Mining. http://factominer.free.fr.
Kahle, David, and Hadley Wickham. 2013. “Ggmap: Spatial Visualization with Ggplot2.” The R Journal 5 (1): 144–61. https://journal.r-project.org/archive/2013-1/kahle-wickham.pdf.
Kahle, David, Hadley Wickham, and Scott Jackson. 2023. Ggmap: Spatial Visualization with Ggplot2. https://github.com/dkahle/ggmap.
Lê, Sébastien, Julie Josse, and François Husson. 2008. FactoMineR: A Package for Multivariate Analysis.” Journal of Statistical Software 25 (1): 1–18. https://doi.org/10.18637/jss.v025.i01.
Müller, Kirill, and Hadley Wickham. 2022. Tibble: Simple Data Frames. https://CRAN.R-project.org/package=tibble.
Oksanen, Jari, Gavin L. Simpson, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter R. Minchin, R. B. O’Hara, et al. 2022. Vegan: Community Ecology Package. https://github.com/vegandevs/vegan.
Peterson, Brian G., and Peter Carl. 2020. PerformanceAnalytics: Econometric Tools for Performance and Risk Analysis. https://github.com/braverock/PerformanceAnalytics.
R Core Team. 2021. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Ryan, Jeffrey A., and Joshua M. Ulrich. 2023. Xts: eXtensible Time Series. https://github.com/joshuaulrich/xts.
Sarkar, Deepayan. 2008. Lattice: Multivariate Data Visualization with r. New York: Springer. http://lmdvr.r-forge.r-project.org.
———. 2021. Lattice: Trellis Graphics for r. http://lattice.r-forge.r-project.org/.
Simpson, Gavin L. 2022. Permute: Functions for Generating Restricted Permutations of Data. https://github.com/gavinsimpson/permute.
Slowikowski, Kamil. 2021. Ggrepel: Automatically Position Non-Overlapping Text Labels with Ggplot2. https://github.com/slowkow/ggrepel.
Tang, Yuan, Masaaki Horikoshi, and Wenxuan Li. 2016. “Ggfortify: Unified Interface to Visualize Statistical Result of Popular r Packages.” The R Journal 8 (2): 474–85. https://doi.org/10.32614/RJ-2016-060.
Wickham, Hadley. 2007. “Reshaping Data with the reshape Package.” Journal of Statistical Software 21 (12): 1–20. http://www.jstatsoft.org/v21/i12/.
———. 2011. “The Split-Apply-Combine Strategy for Data Analysis.” Journal of Statistical Software 40 (1): 1–29. https://www.jstatsoft.org/v40/i01/.
———. 2016. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. https://ggplot2.tidyverse.org.
———. 2020. Reshape2: Flexibly Reshape Data: A Reboot of the Reshape Package. https://github.com/hadley/reshape.
———. 2022a. Forcats: Tools for Working with Categorical Variables (Factors). https://CRAN.R-project.org/package=forcats.
———. 2022b. Plyr: Tools for Splitting, Applying and Combining Data. https://CRAN.R-project.org/package=plyr.
———. 2022c. Stringr: Simple, Consistent Wrappers for Common String Operations. https://CRAN.R-project.org/package=stringr.
———. 2022d. Tidyverse: Easily Install and Load the Tidyverse. https://CRAN.R-project.org/package=tidyverse.
Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.” Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.
Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2022. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.
Wickham, Hadley, Romain François, Lionel Henry, and Kirill Müller. 2022. Dplyr: A Grammar of Data Manipulation. https://CRAN.R-project.org/package=dplyr.
Wickham, Hadley, and Maximilian Girlich. 2022. Tidyr: Tidy Messy Data. https://CRAN.R-project.org/package=tidyr.
Wickham, Hadley, Jim Hester, and Jennifer Bryan. 2022. Readr: Read Rectangular Text Data. https://CRAN.R-project.org/package=readr.
Zeileis, Achim, and Gabor Grothendieck. 2005. “Zoo: S3 Infrastructure for Regular and Irregular Time Series.” Journal of Statistical Software 14 (6): 1–27. https://doi.org/10.18637/jss.v014.i06.
Zeileis, Achim, Gabor Grothendieck, and Jeffrey A. Ryan. 2022. Zoo: S3 Infrastructure for Regular and Irregular Time Series (z’s Ordered Observations). https://zoo.R-Forge.R-project.org/.